-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-2267. Container metadata scanner interval mismatch #1624
Conversation
/label ozone |
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to fix it @adoroszlai. Nice catch.
As the millisecond resolution is enough I think it can be more safer to use type-safe java API:
Sg like:
Instant start = Instant.now();
...
nextCheck = start.plus(metadataScanInterval, ChronoUnit.SECONDS)
remainingMs = Instant.now().until(nextCheck, ChronoUnit.MILLIS)
Time.sleep(remainingMs)
But I am also fine with the current patch as it's definitely better than the earlier code ;-)
Thank you very much to open this pull request. During the weekend the Ozone source code has been moved out from apache/hadoop repository to apache/hadoop-ozone repository. This git commits are rewritten, but the branch of this pull request is also transformed (state of Saturday morning), you can use the new, migrated branch to recreate this pull request. Your pull request is important for us: Can you please re-create your pull request in the new repository? 1. Create a new fork of https://github.com/apache/hadoop-ozone 2. Clone it and have both your fork and the apache repo as remotes:
3. Fetch your migrated branch and push it to your fork.
4. And create the new pull request on the new repository. https://github.com/apache/hadoop-ozone/compare/master...adoroszlai:HDDS-2267?expand=1 If you need more information, please check this wiki page or contact with me (my github user name + apache.org). Thank you, and sorry for the inconvenience. |
Moved to apache/ozone#8 |
What changes were proposed in this pull request?
Fix time unit mismatch in container metadata scanner. Elapsed time is measured in nanoseconds, needs to be converted to milliseconds.
https://issues.apache.org/jira/browse/HDDS-2267
How was this patch tested?
Tested on
ozone
docker-compose cluster.