BinShi-SecularBird commented on a change in pull request #612: PHOENIX-5527
Unverified index rows should not be deleted due to repli…
URL: https://github.com/apache/phoenix/pull/612#discussion_r340318791
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java
##########
@@ -582,7 +584,7 @@ private void
prepareIndexMutations(ObserverContext<RegionCoprocessorEnvironment>
// For this mutation whether it is put or delete, set
the status of the index row "unverified"
// This will be done before the data table row is
updated (i.e., in the first write phase)
Put unverifiedPut = new Put(m.getRow());
- unverifiedPut.addColumn(emptyCF, emptyCQ, now,
UNVERIFIED_BYTES);
+ unverifiedPut.addColumn(emptyCF, emptyCQ, now - 1,
UNVERIFIED_BYTES);
Review comment:
It's better to add comment to explain the magic "now - 1". Something like
"The timestamp of the unverified row is the timestamp of the index full row
(and also the data table row) minus 1. This will make sure that if the
unverified row is deleted by read repair, it will not mask the verified
row."(PHOENIX-5527 https://issues.apache.org/jira/browse/PHOENIX-5527)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services