Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
There are two problems in increment() now:
First:
I see that the timestamp(the variable now) in HRegion's Increment() is generated before got the rowLock, so when there are multi-thread increment the same row, although it generate earlier, it may got the lock later. Because increment just store one version, so till now, the result will still be right.
When the region is flushing, these increment will read the kv from snapshot and memstore with whose timestamp is larger, and write it back to memstore. If the snapshot's timestamp larger than the memstore, the increment will got the old data and then do the increment, it's wrong.
Secondly:
Also there is a risk in increment. Because it writes the memstore first and then HLog, so if it writes HLog failed, the client will also read the incremented value.
Attachments
Attachments
Issue Links
- is blocked by
-
HBASE-6197 HRegion's append operation may lose data
- Closed
- is related to
-
HBASE-10079 Race in TableName cache
- Closed
- relates to
-
HBASE-6269 Lazyseek should use the maxSequenseId StoreFile's KeyValue as the latest KeyValue
- Closed