Skip to content

Commit

Permalink
Focus on the ones that matter
Browse files Browse the repository at this point in the history
  • Loading branch information
henningandersen committed May 30, 2024
1 parent cdc0ea5 commit 0c66e53
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ public final <Request extends ActionRequest, Response extends ActionResponse> Ac
ActionType<Response> action,
Request request
) {
if (EsExecutors.executorName(Thread.currentThread()) != null) {
throw new IllegalStateException("can only call synchronous execute on a test thread " + Thread.currentThread());
}
// if (EsExecutors.executorName(Thread.currentThread()) != null) {
// throw new IllegalStateException("can only call synchronous execute on a test thread " + Thread.currentThread());
// }
// assert EsExecutors.executorName(Thread.currentThread()) == null
// : "can only call synchronous execute on a test thread " + Thread.currentThread();
PlainActionFuture<Response> actionFuture = new RefCountedFuture<>();
Expand Down Expand Up @@ -419,10 +419,9 @@ protected <Request extends ActionRequest, Response extends ActionResponse> void
*/
// todo: the use of UnsafePlainActionFuture here is quite broad, we should find a better way to be more specific
// (unless making all usages safe is easy).
private static class RefCountedFuture<R extends RefCounted> extends UnsafePlainActionFuture<R> {
private static class RefCountedFuture<R extends RefCounted> extends PlainActionFuture<R> {

private RefCountedFuture() {
super(ThreadPool.Names.GENERIC);
}

@Override
Expand Down

0 comments on commit 0c66e53

Please sign in to comment.