Vincent Poon created PHOENIX-5046:
-------------------------------------

             Summary: Race condition in disabling an index can cause an index 
to get out of sync
                 Key: PHOENIX-5046
                 URL: https://issues.apache.org/jira/browse/PHOENIX-5046
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.14.1, 5.0.0
            Reporter: Vincent Poon


Assume a row R at T0.
If two index updates for R at T1 and T2 fail, the index might get marked 
disabled as of T2 due to a race condition.  The partial rebuilder will will 
then rebuild as of T2.  Since T1 was never replayed, the index row at T0 is not 
deleted, leaving an extra orphan row in the index.

This is because In MetaDataEndpointImpl#updateIndexState , we update the index 
state without any rowlocking, so even though we take the min of the new disable 
timestamp and the current disable timestamp, two concurrent requests can be in 
a race condition and succeed in disabling the index with different timestamps.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to