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

    https://github.com/apache/geode/pull/444#discussion_r110719505
  
    --- Diff: 
geode-core/src/main/java/org/apache/geode/internal/cache/DistributedCacheOperation.java
 ---
    @@ -240,12 +240,37 @@ public boolean containsRegionContentChange() {
         return true;
       }
     
    +  public long startOperation() {
    +    DistributedRegion region = getRegion();
    +    long viewVersion = -1;
    +    if (this.containsRegionContentChange()) {
    +      viewVersion = region.getDistributionAdvisor().startOperation();
    +    }
    +    if (logger.isTraceEnabled(LogMarker.STATE_FLUSH_OP)) {
    +      logger.trace(LogMarker.STATE_FLUSH_OP, "dispatching operation in 
view version {}",
    +          viewVersion);
    +    }
    +    return viewVersion;
    +  }
    +
    +  public void endOperation(long viewVersion) {
    +    DistributedRegion region = getRegion();
    +    if (viewVersion != -1) {
    --- End diff --
    
    If somehow we get a -1, will the state flush ever "end?" or are we stuck?


---
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