You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 18, 2019. It is now read-only.
Increment a counter that is not currently in memcache, setting "isolated" to false so that the increment occurs as part of the current TX.
ShardedCounterServiceImpl#increment will end with a call to #getCounter, which will query the datastore for Shard values in an attempt to get the counter's count. Since the initial TX is still open, no shards will be returned (any loads from the Datastore will reflect the current state of the datastore as of the beginning of the TX).
Memcache will be initialized to 0, which is should really be 1 or some other value that's truly the count. Or, if the counter has "count", but hasn't been accessed in a while, then an old value of the count may be populated into memcache.
This problem will go away after the cache entry is evicted, but can cause an incorrect counter count for a short period of time.
Possible Fixes:
Remove the return value of all increment methods so the cache is not updated until all TX's have concluded.
The text was updated successfully, but these errors were encountered:
+ Fixes#11 Default Delete Implementation
+ Fixes#16 Remove redundant counterShard datastore put in ShardedCounterServiceImpl#increment
+ Fixes#17 Enhance the interface of CounterService to not return a count when incrementing/decrementing.
+ Fixes#7 numRetries doesn't get decremented in ShardedCounterServiceImpl.incrementMemcacheAtomic
+ Improve unit tests for new functionality.
Steps to recreate:
This problem will go away after the cache entry is evicted, but can cause an incorrect counter count for a short period of time.
Possible Fixes:
The text was updated successfully, but these errors were encountered: