charlesconnell commented on code in PR #6167: URL: https://github.com/apache/hbase/pull/6167#discussion_r1721036534
########## hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncTableImpl.java: ########## @@ -296,31 +296,16 @@ public <S, R> CompletableFuture<R> coprocessorService(Function<RpcChannel, S> st public <S, R> CoprocessorServiceBuilder<S, R> coprocessorService( Function<RpcChannel, S> stubMaker, ServiceCaller<S, R> callable, CoprocessorCallback<R> callback) { - final Context context = Context.current(); - CoprocessorCallback<R> wrappedCallback = new CoprocessorCallback<R>() { - - @Override - public void onRegionComplete(RegionInfo region, R resp) { - pool.execute(context.wrap(() -> callback.onRegionComplete(region, resp))); - } - - @Override - public void onRegionError(RegionInfo region, Throwable error) { - pool.execute(context.wrap(() -> callback.onRegionError(region, error))); - } - - @Override - public void onComplete() { - pool.execute(context.wrap(callback::onComplete)); - } + return coprocessorService(stubMaker, callable, + (PartialResultCoprocessorCallback<S, R>) callback); + } - @Override - public void onError(Throwable error) { - pool.execute(context.wrap(() -> callback.onError(error))); - } - }; + @Override + public <S, R> CoprocessorServiceBuilder<S, R> coprocessorService( + Function<RpcChannel, S> stubMaker, ServiceCaller<S, R> callable, + PartialResultCoprocessorCallback<S, R> callback) { CoprocessorServiceBuilder<S, R> builder = - rawTable.coprocessorService(stubMaker, callable, wrappedCallback); Review Comment: Workaround for https://issues.apache.org/jira/browse/HBASE-28792. I'll do that ticket before I let this get merged in case this isn't the desired solution. -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org