private Mono<Boolean> createCollectionIfNotExists0(
            boolean exists,
            Class<?> clazz,
            BsonDocument jsonSchema,
            MongoEntity<?> entity) {
        if (exists) {
            // Always update the JSON schema to ensure the schema is up to date.
            return updateJsonSchema(clazz,
                    jsonSchema,
                    ValidationAction.ERROR,
                    ValidationLevel.STRICT).then(PublisherPool.TRUE);
        }
        CreateCollectionOptions options = new CreateCollectionOptions()
                .validationOptions(new ValidationOptions().validator(jsonSchema)
                        .validationAction(ValidationAction.ERROR)
                        .validationLevel(ValidationLevel.STRICT));
        Publisher<Void> source = context.getDatabase()
                .createCollection(entity.collectionName(), options);
        return Mono.from(source)
                .thenReturn(false)
                // https://github.com/turms-im/turms/issues/1010
                .onErrorResume(throwable -> MongoExceptionUtil.isErrorOf(throwable,
                        MongoErrorCodes.NAMESPACE_EXISTS)
                                ? PublisherPool.TRUE
                                : Mono.error(throwable));
    }
@implNote Send requests to ensure indexes and shard collections synchronously to avoid mongo
          servers throwing "LockBusy" error (error code 46)
turms-server-common/src/main/java/im/turms/server/common/storage/mongo/operation/TurmsMongoOperations.java