ndimiduk commented on code in PR #6168:
URL: https://github.com/apache/hbase/pull/6168#discussion_r1740938634
##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTableImpl.java:
##########
@@ -311,7 +321,11 @@ public void onRegionError(RegionInfo region, Throwable
error) {
@Override
public void onComplete() {
- pool.execute(context.wrap(callback::onComplete));
+ pool.execute(context.wrap(() -> {
+ // Guarantee that onComplete() is called after all
onRegionComplete()'s are called
+ regionCompletesInProgress.arriveAndAwaitAdvance();
Review Comment:
According to the Javadoc on this method, `onComplete` must implement a
happens-after semantic for all `onRegionComplete` and all `onRegionError`
invocations. This implies that there are multiple regions to complete AND
multiple forms of completion, so I think that this can be solved with a phaser
; you need a more general purpose mutex.
--
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]