geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darrel Schneider <dschnei...@pivotal.io>
Subject Re: Review Request 58813: GEODE-2776 After region is updated with loader, the ClientEvent is set with current entry version tag
Date Wed, 03 May 2017 17:36:28 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58813/#review173766
-----------------------------------------------------------




geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
Lines 2314 (patched)
<https://reviews.apache.org/r/58813/#comment246803>

    I think this code uses a bit more work.
    If we get here then we should return with this value without calling "endPut" or "recordMiss".
    
    I think the comment you moved to lines 2348-2349 should be here right before you call
updateEventWithCurrentRegionEntry.
    Don't return re from this method; just make it return void.
    Right after you call it calculate and return result.
    I think you should refactor lines 2329-2333 into a little method that we can call here
and on line 2334.
    Get rid of the "result" local var and instead just call this method like so:
      return determineResult(preferCD, event);
      
      private Object determineResult(boolean preferCD, EntryEventImpl event) {
      if (preferCD) {
        return event.getRawNewValueAsHeapObject();
      }
      return event.getNewValue();
    }


- Darrel Schneider


On May 2, 2017, 5:52 p.m., anilkumar gingade wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58813/
> -----------------------------------------------------------
> 
> (Updated May 2, 2017, 5:52 p.m.)
> 
> 
> Review request for geode, Darrel Schneider, Eric Shu, and Lynn Gallinat.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> When client does a get() which results in adding an entry by calling loader on server
side, the client event returned back is not updated with the version tag that is created with
the new entry on server. This results in client having a different version tag than the server
side entry. If client has registered event, and is concurrently updating the entry (from get()
call and an register-event from server), it could result in data consistency between client
and server.
> 
> 
> Diffs
> -----
> 
>   geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java 8cdc517

>   geode-core/src/test/java/org/apache/geode/internal/cache/DistributedRegionSearchLoadJUnitTest.java
PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/58813/diff/3/
> 
> 
> Testing
> -------
> 
> Manual testing.
> Running new unit test (added) with and without changes.
> precheckin in progress.
> 
> 
> Thanks,
> 
> anilkumar gingade
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message