ohadshacham commented on a change in pull request #59: [OMID-146] Fix consistensy of compaction when the commit time stamp has… URL: https://github.com/apache/incubator-omid/pull/59#discussion_r278000266
########## File path: tso-server/src/main/java/org/apache/omid/tso/ReplyProcessorImpl.java ########## @@ -180,9 +192,19 @@ public void manageResponsesBatch(long batchSequence, Batch batch) { } - @Override - public void sendCommitResponse(long startTimestamp, long commitTimestamp, Channel c, MonitoringContext monCtx) { + @VisibleForTesting + void updateLowWatermark(Optional<Long> newLowwatermark) { + //TODO YONIGO - validate this is single threaded + if (newLowwatermark.isPresent() && newLowwatermark.get() > highestLowWaterMarkSeen) { + highestLowWaterMarkSeen = newLowwatermark.get(); + lowWatermarkWriter.persistLowWatermark(highestLowWaterMarkSeen); Review comment: Basically, you can write the low water mark only once per batch, just collect the highest as you do in here and write it, in case it exists, once the batch terminates. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services