You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Anilkumar Gingade (JIRA)" <ji...@apache.org> on 2018/09/12 19:00:01 UTC
[jira] [Created] (GEODE-5733) Region size could be wrong when there
is failure during GII
Anilkumar Gingade created GEODE-5733:
----------------------------------------
Summary: Region size could be wrong when there is failure during GII
Key: GEODE-5733
URL: https://issues.apache.org/jira/browse/GEODE-5733
Project: Geode
Issue Type: Improvement
Components: regions
Reporter: Anilkumar Gingade
The region size is calculated using size of underlying map and tombstone count:
size = map.size() - tombstone.
The increment and decrement op on map and tombstone (creation) are non-atomic; which could result in region size reporting incorrectly.
One of the scenario:
-- Thread-1 is creating region; it sends region profile starts sends initial image request.
-- Meanwhile Thread-2 does a destroy (replicated message); its not yet incremented the Tombstone count.
-- Thread-1 fails to do GII; as a result of this. It clears the entries from the region.
-- Now Thread-2 increments the tombstone count. Which corrupts the state.
The probable fix could be to make the “getSizeGuard()” on local region used by size() and clear() to use read-write lock. The tombstone creation uses read lock; clear() and size() will use write lock.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)