private Mono<SharedClusterProperties> initializeSharedProperties() {
        LOGGER.info("Fetching shared properties");
        TurmsProperties localProperties = propertiesManager.getLocalProperties();
        SharedClusterProperties clusterProperties = new SharedClusterProperties(
                clusterId,
                TurmsProperties.SCHEMA_VERSION,
                localProperties,
                new Date());
        switch (nodeType) {
            case AI_SERVING -> {
                clusterProperties.setGatewayProperties(null);
                clusterProperties.setServiceProperties(null);
                clusterProperties.setMockNodeProperties(null);
            }
            case GATEWAY -> {
                clusterProperties.setAiServingProperties(null);
                clusterProperties.setServiceProperties(null);
                clusterProperties.setMockNodeProperties(null);
            }
            case SERVICE -> {
                clusterProperties.setAiServingProperties(null);
                clusterProperties.setGatewayProperties(null);
                clusterProperties.setMockNodeProperties(null);
            }
            case MOCK -> {
                clusterProperties.setAiServingProperties(null);
                clusterProperties.setGatewayProperties(null);
                clusterProperties.setServiceProperties(null);
            }
        }
        return findAndUpdatePropertiesByNodeType(clusterProperties)
                .switchIfEmpty(Mono.defer(() -> sharedConfigService.insert(clusterProperties)))
                .onErrorResume(DuplicateKeyException.class,
                        e -> findAndUpdatePropertiesByNodeType(clusterProperties))
                .doOnError(t -> LOGGER.error("Failed to fetch shared properties", t))
                .doOnSuccess(properties -> {
                    sharedClusterProperties = properties;
                    LOGGER.info("Fetched shared properties");
                });
    }
@implNote We don't support the partial update by {@link java.util.Map} because there is not
          an efficient way to update nested objects of a document in MongoDB.
turms-server-common/src/main/java/im/turms/server/common/infra/cluster/service/config/SharedPropertyService.java