code: private void indexInitializationFailed(long streamSegmentId, CompletableFuture<AttributeIndex> result, Throwable ex) {
          synchronized (this.attributeIndices) {
              this.attributeIndices.remove(streamSegmentId);
          }
  
          result.completeExceptionally(ex);
      }
docs: region Helpers