eolivelli commented on a change in pull request #851: Issue 578 : make
MajorCompaction controlled by time of the day/day of the week
URL: https://github.com/apache/bookkeeper/pull/851#discussion_r156864834
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/GarbageCollectorThread.java
##########
@@ -183,6 +233,8 @@ public GarbageCollectorThread(ServerConfiguration conf,
+ majorCompactionThreshold + ", interval=" +
majorCompactionInterval);
lastMinorCompactionTime = lastMajorCompactionTime = MathUtils.now();
+ calendar = Calendar.getInstance();
Review comment:
You have to create a new calendar at every execution.
You have to explicitly configure a timezone for this calendar, otherwise the
configuration is not deterministic
Can you consider using java time API and not legacy Calendar?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services