krconv commented on PR #7131:
URL: https://github.com/apache/hbase/pull/7131#issuecomment-3144330202
> I think there are scenarios where we do not know how to retry? For
example, we have finished a request to region, and when sending request to the
next region, these two regions are merged. Then what is the correct way to do
retrying here? Sending request again to the merged region? Or just jump to the
next region?
Sorry for the delay. In that case, this new logic would fail the request
because ya, there is no way to return a response that doesn't double-count
rows; in the code I am calling this an "overlappingAssignments"
1. Run on Parent Region A, succeeds
2. Region A and B merge to C
3. Run on Region B (which is what was in our client's meta cache), fails
due to RegionNoLongerExistsException
4. Relocate the rows that Region B covered, find out that Region C now
exists
5. Attempt to "claim assignment" of the new range for Region C, find out
that it overlaps with a region already processed, fail
This is a less-likely race condition in this already unlikely scenario. The
more common case I'd expect is for A and B to be merged sometime before the
coprocessor service is called. In that scenario:
1. <start with a warmed meta cache>
2. Region A and B merge to C
3. Run on Region A, fails due to RegionNoLongerExistsException
4. Relocate the regions that Region A covered, find out that Region C now
exists
5. Attempt to "claim assignment", succeeds because it is a range not
already processed
In this situation we can recover the request and maintain correctness;
without this PR, `AsyncTable` fails in this scenario and `HTable` returns
incorrect results (it would run the coprocessor service twice on Region C, and
in cases that we are counting rows and returning the results, would dual-count
those rows)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]