public void waitForIndexInit() {
    synchronized (indexes) {
      ++numUpdatersInWaiting;
      while (numCreators > 0) {
        ((LocalRegion) getRegion()).getCancelCriterion().checkCancelInProgress(null);
        boolean interrupted = Thread.interrupted();
        try {
          indexes.wait();
        } catch (InterruptedException ignored) {
          interrupted = true;
        } finally {
          if (interrupted) {
            Thread.currentThread().interrupt();
          }
        }
      } // while
      --numUpdatersInWaiting;
      ++numUpdatersInProgress;
    }
  }
Wait for index initialization before entry create, update, invalidate or destroy operation.

Note: If the region has a disk region then we should wait for index initialization before
getting region entry lock to avoid deadlock (#44431).
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java