private boolean needRotateTieredStorageZones(
            MongoEntity<?> entity,
            List<Tag> tags,
            List<Pair<String, StorageTierProperties>> propertiesPairs) {
        if (tags.isEmpty()) {
            return true;
        }
        Map<String, Tag> nameToTag = tags.stream()
                .collect(Collectors.toMap(Tag::tag, tag -> tag));
        String creationDateFieldName = entity.zone()
                .creationDateFieldName();
        long now = System.currentTimeMillis();
        long elapsedTime = 0;
        for (Pair<String, StorageTierProperties> pair : propertiesPairs) {
            Tag tag = nameToTag.get(pair.first());
            if (tag == null) {
                return true;
            }
            if (elapsedTime == 0) {
                Object date = tag.minimum()
                        .get(creationDateFieldName);
                if (date == null) {
                    return true;
                } else if (date instanceof MinKey) {
                    return propertiesPairs.size() != 1;
                } else if (date instanceof Date creationDateLower) {
                    elapsedTime = now - creationDateLower.getTime();
                } else {
                    return true;
                }
            }
            int days = pair.second()
                    .getDays();
            if (days > 0
                    && elapsedTime > Duration.ofDays(days)
                            .toMillis()) {
                return true;
            }
        }
        return false;
    }
@return True if all collections have existed
turms-service/src/main/java/im/turms/service/storage/mongo/MongoCollectionInitializer.java