private void onMemberUpdated(String nodeId, UpdateDescription updateDescription) {
        Member memberToUpdate = allKnownMembers.get(nodeId);
        if (memberToUpdate == null) {
            LOGGER.error("Could not update the information of the unknown member: "
                    + nodeId);
            return;
        }
        // Info
        Set<Map.Entry<String, BsonValue>> entries = updateDescription.getUpdatedFields()
                .entrySet();
        for (Map.Entry<String, BsonValue> entry : entries) {
            // We don't use reflection to update fields for clarity and
            // better maintainability considering possible field changes
            String fieldName = entry.getKey();
            BsonValue value = entry.getValue();
            // Check status change
            if (fieldName.endsWith(Member.MemberStatus.Fields.lastHeartbeatDate)) {
                memberToUpdate.getStatus()
                        .setLastHeartbeatDate(new Date(
                                value.asDateTime()
                                        .getValue()));
            } else if (fieldName.endsWith(Member.MemberStatus.Fields.hasJoinedCluster)) {
                memberToUpdate.getStatus()
                        .setHasJoinedCluster(value.asBoolean()
                                .getValue());
            } else if (fieldName.endsWith(Member.MemberStatus.Fields.isActive)) {
                memberToUpdate.getStatus()
                        .setIsActive(value.asBoolean()
                                .getValue());
            } else if (fieldName.endsWith(Member.MemberStatus.Fields.isHealthy)) {
                memberToUpdate.getStatus()
                        .setIsHealthy(value.asBoolean()
                                .getValue());
                // Check info
            } else if (fieldName.equals(Member.Fields.zone)) {
                memberToUpdate.setZone(value.asString()
                        .getValue());
            } else if (fieldName.equals(Member.Fields.isSeed)) {
                // TODO: RENAME
                memberToUpdate.setIsSeed(value.asBoolean()
                        .getValue());
            } else if (fieldName.equals(Member.Fields.isLeaderEligible)) {
                memberToUpdate.setIsLeaderEligible(value.asBoolean()
                        .getValue());
            } else if (fieldName.equals(Member.Fields.priority)) {
                memberToUpdate.setPriority(value.asInt32()
                        .getValue());
            } else if (fieldName.equals(Member.Fields.memberHost)) {
                memberToUpdate.setMemberHost(value.asString()
                        .getValue());
            } else if (fieldName.equals(Member.Fields.adminApiAddress)) {
                memberToUpdate.setAdminApiAddress(value.asString()
                        .getValue());
            } else if (fieldName.equals(Member.Fields.wsAddress)) {
                memberToUpdate.setWsAddress(value.asString()
                        .getValue());
            } else if (fieldName.equals(Member.Fields.tcpAddress)) {
                memberToUpdate.setTcpAddress(value.asString()
                        .getValue());
            } else if (fieldName.equals(Member.Fields.udpAddress)) {
                memberToUpdate.setUdpAddress(value.asString()
                        .getValue());
            } else {
                LOGGER.warn(
                        "Could not update the unknown field \"{}\" with the value ({}) for the member: {}",
                        fieldName,
                        value,
                        memberToUpdate);
            }
        }
    }
@return a positive or negative number, and never 0 to ensure that the order is consistent in
        every node.
turms-server-common/src/main/java/im/turms/server/common/infra/cluster/service/discovery/DiscoveryService.java