You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Dan Smith <ds...@pivotal.io> on 2016/11/02 19:26:03 UTC

Review Request 53398: GEODE-1985: Updating the SAFE_QUERY_TIME after updating indexes

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

Review request for geode, Jason Huynh and nabarun nag.


Repository: geode


Description
-------

This is a fix for pretty specific race condition
1) T1 does a put and gets to the point of calling setIndexBufferTime,
but hasn't updated the indexes
2) T2 starts a query and finds the entry in the index even though the
value no longer matches the query
3) T1 finishes the put
4) T2 checks to see if should revaluate the entry, but decides not to
because based on the SAFE_QUERY_TIME value the entry changed before the
query started.

By moving the update to SAFE_QUERY_TIME down, if the an entry
doesn't need reevaluation based on the SAFE_QUERY_TIME, we know the
index was updated before the query started.

There is currently an updateInProgress flag to handle the issue of the
query executing before the SAFE_QUERY_TIME is updated. If the entry is
updated, but not the index, the updateInProgress flag will be set.


Diffs
-----

  geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java 360c6a9f444b41a99bec1a896e660bd506d793ff 

Diff: https://reviews.apache.org/r/53398/diff/


Testing
-------


Thanks,

Dan Smith


Re: Review Request 53398: GEODE-1985: Updating the SAFE_QUERY_TIME after updating indexes

Posted by Jason Huynh <jh...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53398/#review154621
-----------------------------------------------------------


Ship it!




Ship It!

- Jason Huynh


On Nov. 2, 2016, 7:26 p.m., Dan Smith wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53398/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2016, 7:26 p.m.)
> 
> 
> Review request for geode, Jason Huynh and nabarun nag.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> This is a fix for pretty specific race condition
> 1) T1 does a put and gets to the point of calling setIndexBufferTime,
> but hasn't updated the indexes
> 2) T2 starts a query and finds the entry in the index even though the
> value no longer matches the query
> 3) T1 finishes the put
> 4) T2 checks to see if should revaluate the entry, but decides not to
> because based on the SAFE_QUERY_TIME value the entry changed before the
> query started.
> 
> By moving the update to SAFE_QUERY_TIME down, if the an entry
> doesn't need reevaluation based on the SAFE_QUERY_TIME, we know the
> index was updated before the query started.
> 
> There is currently an updateInProgress flag to handle the issue of the
> query executing before the SAFE_QUERY_TIME is updated. If the entry is
> updated, but not the index, the updateInProgress flag will be set.
> 
> 
> Diffs
> -----
> 
>   geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java 360c6a9f444b41a99bec1a896e660bd506d793ff 
> 
> Diff: https://reviews.apache.org/r/53398/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dan Smith
> 
>