@Override
    public Mono<Void> enableSharding() {
        String dbName = context.getDatabase()
                .getName();
        Publisher<Document> source = context.getAdminDatabase()
                .runCommand(new Document("enableSharding", dbName));
        return Mono.from(source)
                .onErrorMap(t -> new RuntimeException(
                        "Failed to enable sharding the database: \""
                                + dbName
                                + "\"",
                        t))
                .doOnSuccess(
                        ignored -> LOGGER.info("Enabled sharding the database: \"{}\"", dbName))
                .then();
    }
apply the shard key to the filter so that mongos know to which MongoDB the command needs to
be sent for better performance
turms-server-common/src/main/java/im/turms/server/common/storage/mongo/operation/TurmsMongoOperations.java