Github user jhuynh1 commented on a diff in the pull request:

    https://github.com/apache/geode/pull/448#discussion_r111011735
  
    --- Diff: 
geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegionQueue.java 
---
    @@ -464,16 +464,21 @@ private void setLatestAcknowledgedKey(Long key) {
         this.latestAcknowledgedKey.set(key);
       }
     
    -  public boolean waitUntilFlushed(long timeout, TimeUnit unit) throws 
InterruptedException {
    +  public long getLatestQueuedKey() {
    +    return this.latestQueuedKey.get();
    +  }
    +
    +  public boolean waitUntilFlushed(long latestQueuedKey, long timeout, 
TimeUnit unit)
    +      throws InterruptedException {
         long then = System.currentTimeMillis();
         if (logger.isDebugEnabled()) {
    -      logger.debug("BucketRegionQueue: waitUntilFlushed bucket=" + getId() 
+ "; timeout=" + timeout
    -          + "; unit=" + unit);
    +      logger.debug("BucketRegionQueue: waitUntilFlushed bucket=" + getId() 
+ "; latestQueuedKey="
    +          + latestQueuedKey + "; timeout=" + timeout + "; unit=" + unit);
         }
         boolean result = false;
         // Wait until latestAcknowledgedKey > latestQueuedKey or the queue is 
empty
         if (this.initialized) {
    -      long latestQueuedKeyToCheck = this.latestQueuedKey.get();
    +      long latestQueuedKeyToCheck = latestQueuedKey;
    --- End diff --
    
    Not an actual problem, but we probably could just replace this variable 
altogether and only use latestQueueKey instead.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to