You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/09/24 14:21:50 UTC

[GitHub] [accumulo] ctubbsii commented on a change in pull request #2289: Adds unit test for compaction file tracking

ctubbsii commented on a change in pull request #2289:
URL: https://github.com/apache/accumulo/pull/2289#discussion_r715656066



##########
File path: server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java
##########
@@ -262,7 +268,7 @@ void finishSelection(Set<StoredTabletFile> selected, boolean allSelected) {
       Preconditions.checkArgument(!selected.isEmpty());
       Preconditions.checkState(selectStatus == FileSelectionStatus.SELECTING);
       selectStatus = FileSelectionStatus.SELECTED;
-      selectedTime = System.currentTimeMillis();
+      selectedTime = getCurentTimeMillis();

Review comment:
       This method is spelled wrong. Also, in order to avoid timing bugs with system clock changes, which can occur at any time in the system for many reasons (NTP adjustments, daylight savings adjustments, user switching the time zone or setting the clock manually, etc.), this should really be based on nanoTime if all the times are retrieved from the same running process.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org