public long getDatabaseMaxTTL(final String database) {
    final long ttl = ttlInfo.getDatabaseMaxTTL(database);
    return ttl == Long.MAX_VALUE || ttl < 0
        ? ttl
        : CommonDateTimeUtils.convertMilliTimeWithPrecision(
            ttl, CommonDescriptor.getInstance().getConfig().getTimestampPrecision());
  }
Get the maximum ttl of the subtree of the corresponding database.

@param database the path of the database.
@return the maximum ttl of the subtree of the corresponding database. return NULL_TTL if the
    TTL is not set or the database does not exist.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/TTLManager.java