You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by anilkumar gingade <ag...@pivotal.io> on 2017/04/27 19:44:39 UTC
Review Request 58813: GEODE-2776 After region is updated with loader,
the ClientEvent is set with current entry version tag
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58813/
-----------------------------------------------------------
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/AbstractDistributedRegionJUnitTest.java ba2f794
geode-core/src/test/java/org/apache/geode/internal/cache/DistributedRegionJUnitTest.java 7525f35
Diff: https://reviews.apache.org/r/58813/diff/1/
Testing
-------
Manual testing.
Running new unit test (added) with and without changes.
precheckin in progress.
Thanks,
anilkumar gingade
Re: Review Request 58813: GEODE-2776 After region is updated with
loader, the ClientEvent is set with current entry version tag
Posted by Darrel Schneider <ds...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58813/#review173279
-----------------------------------------------------------
geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
Line 2352 (original), 2357 (patched)
<https://reviews.apache.org/r/58813/#comment246316>
I think this code needs to also update clientEvent by calling rs.getVersionStamp().asVersionTag()
- Darrel Schneider
On April 27, 2017, 12:44 p.m., anilkumar gingade wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58813/
> -----------------------------------------------------------
>
> (Updated April 27, 2017, 12:44 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/AbstractDistributedRegionJUnitTest.java ba2f794
> geode-core/src/test/java/org/apache/geode/internal/cache/DistributedRegionJUnitTest.java 7525f35
>
>
> Diff: https://reviews.apache.org/r/58813/diff/1/
>
>
> Testing
> -------
>
> Manual testing.
> Running new unit test (added) with and without changes.
> precheckin in progress.
>
>
> Thanks,
>
> anilkumar gingade
>
>
Re: Review Request 58813: GEODE-2776 After region is updated with
loader, the ClientEvent is set with current entry version tag
Posted by anilkumar gingade <ag...@pivotal.io>.
> On April 28, 2017, 11:33 p.m., Darrel Schneider wrote:
> > geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
> > Lines 2358 (patched)
> > <https://reviews.apache.org/r/58813/diff/2/?file=1703674#file1703674line2358>
> >
> > I just thought of one more possible issue.
> > I think you want to get the versionTag and the value from "re" atomically.
> > I remember a fix like this before in which you need to make sure the value you get from a region entry is the same as the version tag.
Good catch...Added this new changes posted.
- anilkumar
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58813/#review173400
-----------------------------------------------------------
On April 28, 2017, 11:23 p.m., anilkumar gingade wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58813/
> -----------------------------------------------------------
>
> (Updated April 28, 2017, 11:23 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/2/
>
>
> Testing
> -------
>
> Manual testing.
> Running new unit test (added) with and without changes.
> precheckin in progress.
>
>
> Thanks,
>
> anilkumar gingade
>
>
Re: Review Request 58813: GEODE-2776 After region is updated with
loader, the ClientEvent is set with current entry version tag
Posted by Darrel Schneider <ds...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58813/#review173400
-----------------------------------------------------------
geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java
Lines 2358 (patched)
<https://reviews.apache.org/r/58813/#comment246398>
I just thought of one more possible issue.
I think you want to get the versionTag and the value from "re" atomically.
I remember a fix like this before in which you need to make sure the value you get from a region entry is the same as the version tag.
- Darrel Schneider
On April 28, 2017, 4:23 p.m., anilkumar gingade wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58813/
> -----------------------------------------------------------
>
> (Updated April 28, 2017, 4:23 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/2/
>
>
> Testing
> -------
>
> Manual testing.
> Running new unit test (added) with and without changes.
> precheckin in progress.
>
>
> Thanks,
>
> anilkumar gingade
>
>
Re: Review Request 58813: GEODE-2776 After region is updated with
loader, the ClientEvent is set with current entry version tag
Posted by Darrel Schneider <ds...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58813/#review173838
-----------------------------------------------------------
Ship it!
Ship It!
- Darrel Schneider
On May 3, 2017, 3:14 p.m., anilkumar gingade wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58813/
> -----------------------------------------------------------
>
> (Updated May 3, 2017, 3:14 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/4/
>
>
> Testing
> -------
>
> Manual testing.
> Running new unit test (added) with and without changes.
> precheckin in progress.
>
>
> Thanks,
>
> anilkumar gingade
>
>
Re: Review Request 58813: GEODE-2776 After region is updated with
loader, the ClientEvent is set with current entry version tag
Posted by Darrel Schneider <ds...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58813/#review174040
-----------------------------------------------------------
Ship it!
Ship It!
- Darrel Schneider
On May 4, 2017, 8:57 p.m., anilkumar gingade wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58813/
> -----------------------------------------------------------
>
> (Updated May 4, 2017, 8:57 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 0c967c9
> geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java 2dec53b
> geode-core/src/test/java/org/apache/geode/internal/cache/DistributedRegionSearchLoadJUnitTest.java PRE-CREATION
>
>
> Diff: https://reviews.apache.org/r/58813/diff/5/
>
>
> Testing
> -------
>
> Manual testing.
> Running new unit test (added) with and without changes.
> precheckin in progress.
>
>
> Thanks,
>
> anilkumar gingade
>
>
Re: Review Request 58813: GEODE-2776 After region is updated with
loader, the ClientEvent is set with current entry version tag
Posted by anilkumar gingade <ag...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58813/
-----------------------------------------------------------
(Updated May 5, 2017, 3:57 a.m.)
Review request for geode, Darrel Schneider, Eric Shu, and Lynn Gallinat.
Changes
-------
Fixing unit test failure ProxyJUnitTest.testExpiration()
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 (updated)
-----
geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java 0c967c9
geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java 2dec53b
geode-core/src/test/java/org/apache/geode/internal/cache/DistributedRegionSearchLoadJUnitTest.java PRE-CREATION
Diff: https://reviews.apache.org/r/58813/diff/5/
Changes: https://reviews.apache.org/r/58813/diff/4-5/
Testing
-------
Manual testing.
Running new unit test (added) with and without changes.
precheckin in progress.
Thanks,
anilkumar gingade
Re: Review Request 58813: GEODE-2776 After region is updated with
loader, the ClientEvent is set with current entry version tag
Posted by anilkumar gingade <ag...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58813/
-----------------------------------------------------------
(Updated May 3, 2017, 10:14 p.m.)
Review request for geode, Darrel Schneider, Eric Shu, and Lynn Gallinat.
Changes
-------
Refactored the findObjectInSystem(). Moved the code to separate methods based on the logical blocks.
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 (updated)
-----
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/4/
Changes: https://reviews.apache.org/r/58813/diff/3-4/
Testing
-------
Manual testing.
Running new unit test (added) with and without changes.
precheckin in progress.
Thanks,
anilkumar gingade
Re: Review Request 58813: GEODE-2776 After region is updated with
loader, the ClientEvent is set with current entry version tag
Posted by Darrel Schneider <ds...@pivotal.io>.
-----------------------------------------------------------
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
>
>
Re: Review Request 58813: GEODE-2776 After region is updated with
loader, the ClientEvent is set with current entry version tag
Posted by anilkumar gingade <ag...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58813/
-----------------------------------------------------------
(Updated May 3, 2017, 12:52 a.m.)
Review request for geode, Darrel Schneider, Eric Shu, and Lynn Gallinat.
Changes
-------
Changes are made to get versionTag and the value from "re" atomically. Also refactored the findObjectInSystem(), moved relavent code to separate methods.
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 (updated)
-----
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/
Changes: https://reviews.apache.org/r/58813/diff/2-3/
Testing
-------
Manual testing.
Running new unit test (added) with and without changes.
precheckin in progress.
Thanks,
anilkumar gingade
Re: Review Request 58813: GEODE-2776 After region is updated with
loader, the ClientEvent is set with current entry version tag
Posted by anilkumar gingade <ag...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58813/
-----------------------------------------------------------
(Updated April 28, 2017, 11:23 p.m.)
Review request for geode, Darrel Schneider, Eric Shu, and Lynn Gallinat.
Changes
-------
Add review changes. Moved test code to new file.
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 (updated)
-----
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/2/
Changes: https://reviews.apache.org/r/58813/diff/1-2/
Testing
-------
Manual testing.
Running new unit test (added) with and without changes.
precheckin in progress.
Thanks,
anilkumar gingade