[jira] [Commented] (GEODE-1985) IndexManager.needsRecalculation can miss cases where recalulation is needed

2016-11-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15645358#comment-15645358
 ] 

ASF subversion and git services commented on GEODE-1985:


Commit 2e1a8c420fd984bdcc605ababe93b0e6c6b29919 in incubator-geode's branch 
refs/heads/feature/GEODE-288 from [~upthewaterspout]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=2e1a8c4 ]

GEODE-1985: Updating the SAFE_QUERY_TIME after updating indexes

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, the 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.


> IndexManager.needsRecalculation can miss cases where recalulation is needed
> ---
>
> Key: GEODE-1985
> URL: https://issues.apache.org/jira/browse/GEODE-1985
> Project: Geode
>  Issue Type: Bug
>  Components: querying
>Reporter: Dan Smith
>Assignee: Dan Smith
> Fix For: 1.1.0-incubating
>
>
> When returning query results from an index, we check 
> IndexManager.needsRecalculation to see if an entry might have changed while 
> the query was in progress. 
> Unfortunately, this method can return false negatives If an entry has not yet 
> updated the SAFE_QUERY_TIME field.
> The SAFE_QUERY_TIME is updated in LocalRegion.updateStatsForPut. That method 
> is called *after* the region entry was modified. So the SAFE_QUERY_TIME could 
> be 0, even though an entry was modified, which will make this expression 
> false.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GEODE-1985) IndexManager.needsRecalculation can miss cases where recalulation is needed

2016-11-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15645357#comment-15645357
 ] 

ASF subversion and git services commented on GEODE-1985:


Commit 4c0d302fcacdc338d967c2fb873c05d0a52f109f in incubator-geode's branch 
refs/heads/feature/GEODE-288 from [~upthewaterspout]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=4c0d302 ]

GEODE-1985 Removing some string comparisons in the AttributesDescriptor

Optimizing the attributes descriptor by removing some string
comparisons.


> IndexManager.needsRecalculation can miss cases where recalulation is needed
> ---
>
> Key: GEODE-1985
> URL: https://issues.apache.org/jira/browse/GEODE-1985
> Project: Geode
>  Issue Type: Bug
>  Components: querying
>Reporter: Dan Smith
>Assignee: Dan Smith
> Fix For: 1.1.0-incubating
>
>
> When returning query results from an index, we check 
> IndexManager.needsRecalculation to see if an entry might have changed while 
> the query was in progress. 
> Unfortunately, this method can return false negatives If an entry has not yet 
> updated the SAFE_QUERY_TIME field.
> The SAFE_QUERY_TIME is updated in LocalRegion.updateStatsForPut. That method 
> is called *after* the region entry was modified. So the SAFE_QUERY_TIME could 
> be 0, even though an entry was modified, which will make this expression 
> false.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GEODE-1985) IndexManager.needsRecalculation can miss cases where recalulation is needed

2016-11-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15645014#comment-15645014
 ] 

ASF subversion and git services commented on GEODE-1985:


Commit cc67eddb6c385bf5f87db0dae488bf0b0a5a8d5d in incubator-geode's branch 
refs/heads/feature/GEODE-2017 from [~upthewaterspout]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=cc67edd ]

GEODE-1985: Updating the SAFE_QUERY_TIME after updating indexes

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, the 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.


> IndexManager.needsRecalculation can miss cases where recalulation is needed
> ---
>
> Key: GEODE-1985
> URL: https://issues.apache.org/jira/browse/GEODE-1985
> Project: Geode
>  Issue Type: Bug
>  Components: querying
>Reporter: Dan Smith
>Assignee: Dan Smith
> Fix For: 1.1.0-incubating
>
>
> When returning query results from an index, we check 
> IndexManager.needsRecalculation to see if an entry might have changed while 
> the query was in progress. 
> Unfortunately, this method can return false negatives If an entry has not yet 
> updated the SAFE_QUERY_TIME field.
> The SAFE_QUERY_TIME is updated in LocalRegion.updateStatsForPut. That method 
> is called *after* the region entry was modified. So the SAFE_QUERY_TIME could 
> be 0, even though an entry was modified, which will make this expression 
> false.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GEODE-1985) IndexManager.needsRecalculation can miss cases where recalulation is needed

2016-11-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15644888#comment-15644888
 ] 

ASF subversion and git services commented on GEODE-1985:


Commit 2e1a8c420fd984bdcc605ababe93b0e6c6b29919 in incubator-geode's branch 
refs/heads/develop from [~upthewaterspout]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=2e1a8c4 ]

GEODE-1985: Updating the SAFE_QUERY_TIME after updating indexes

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, the 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.


> IndexManager.needsRecalculation can miss cases where recalulation is needed
> ---
>
> Key: GEODE-1985
> URL: https://issues.apache.org/jira/browse/GEODE-1985
> Project: Geode
>  Issue Type: Bug
>  Components: querying
>Reporter: Dan Smith
>
> When returning query results from an index, we check 
> IndexManager.needsRecalculation to see if an entry might have changed while 
> the query was in progress. 
> Unfortunately, this method can return false negatives If an entry has not yet 
> updated the SAFE_QUERY_TIME field.
> The SAFE_QUERY_TIME is updated in LocalRegion.updateStatsForPut. That method 
> is called *after* the region entry was modified. So the SAFE_QUERY_TIME could 
> be 0, even though an entry was modified, which will make this expression 
> false.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GEODE-1985) IndexManager.needsRecalculation can miss cases where recalulation is needed

2016-11-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15644887#comment-15644887
 ] 

ASF subversion and git services commented on GEODE-1985:


Commit 4c0d302fcacdc338d967c2fb873c05d0a52f109f in incubator-geode's branch 
refs/heads/develop from [~upthewaterspout]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=4c0d302 ]

GEODE-1985 Removing some string comparisons in the AttributesDescriptor

Optimizing the attributes descriptor by removing some string
comparisons.


> IndexManager.needsRecalculation can miss cases where recalulation is needed
> ---
>
> Key: GEODE-1985
> URL: https://issues.apache.org/jira/browse/GEODE-1985
> Project: Geode
>  Issue Type: Bug
>  Components: querying
>Reporter: Dan Smith
>
> When returning query results from an index, we check 
> IndexManager.needsRecalculation to see if an entry might have changed while 
> the query was in progress. 
> Unfortunately, this method can return false negatives If an entry has not yet 
> updated the SAFE_QUERY_TIME field.
> The SAFE_QUERY_TIME is updated in LocalRegion.updateStatsForPut. That method 
> is called *after* the region entry was modified. So the SAFE_QUERY_TIME could 
> be 0, even though an entry was modified, which will make this expression 
> false.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GEODE-1985) IndexManager.needsRecalculation can miss cases where recalulation is needed

2016-10-24 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15602780#comment-15602780
 ] 

ASF subversion and git services commented on GEODE-1985:


Commit d6afb70d474e54a63523b3d3245a67e18f547c15 in incubator-geode's branch 
refs/heads/feature/GEODE-1985 from [~upthewaterspout]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=d6afb70 ]

GEODE-1985: Check for index expression reevalaution using a time window

Changing the logic for how to we check to see if an entry may have been
concurrently modified while an indexed query is in progress.

The new logic just has a time window, defaulting to 10 minutes. If the
entry was changed less than 10 minutes for the query started, we will
reevaluate the index expression to make sure the entry is still valid.


> IndexManager.needsRecalculation can miss cases where recalulation is needed
> ---
>
> Key: GEODE-1985
> URL: https://issues.apache.org/jira/browse/GEODE-1985
> Project: Geode
>  Issue Type: Bug
>  Components: querying
>Reporter: Dan Smith
>
> When returning query results from an index, we check 
> IndexManager.needsRecalculation to see if an entry might have changed while 
> the query was in progress. 
> Unfortunately, this method can return false negatives If an entry has not yet 
> updated the SAFE_QUERY_TIME field.
> The SAFE_QUERY_TIME is updated in LocalRegion.updateStatsForPut. That method 
> is called *after* the region entry was modified. So the SAFE_QUERY_TIME could 
> be 0, even though an entry was modified, which will make this expression 
> false.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)