`GatewayService` implements logic for delaying state recovery in the cluster until enough data nodes have joined and/or some timeout has occurred. The implementation is pretty old and doesn't make use of much modern infrastructure for doing this kind of thing, making it pretty hard to follow and to improve (see e.g. #86588). We should clean it up and simplify it.
test/framework/src/main/java/org/elasticsearch/common/util/concurrent/DeterministicTaskQueue.java
}
                @Override
                public <T> T invokeAny(Collection<? extends Callable<T>> tasks) {
                    throw new UnsupportedOperationException();
                }
                @Override
                public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) {
                    throw new UnsupportedOperationException();
                }
                @Override
                public void execute(Runnable command) {
                    scheduleNow(runnableWrapper.apply(command));
                }
                @Override
                public String toString() {
                    return "DeterministicTaskQueue/forkingExecutor";
                }
            };
            @Override
            public long relativeTimeInNanos() {
                throw new AssertionError("DeterministicTaskQueue does not support nanosecond-precision timestamps");
            }
            @Override
            public long relativeTimeInMillis() {
                return currentTimeMillis;
            }
            @Override
            public long rawRelativeTimeInMillis() {
                return currentTimeMillis;
            }