This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 3ba8c719310 Fix default database ttl (#12846)
3ba8c719310 is described below
commit 3ba8c719310b7d344549d38c042f6e561bc439fa
Author: Jiang Tian <[email protected]>
AuthorDate: Wed Jul 3 17:11:51 2024 +0800
Fix default database ttl (#12846)
---
.../apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java
index d2220feb770..aa59c8f1374 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/schema/ClusterSchemaManager.java
@@ -396,7 +396,8 @@ public class ClusterSchemaManager {
Map<String, Long> infoMap = new ConcurrentHashMap<>();
for (String database : databases) {
try {
- long ttl = getDatabaseSchemaByName(database).getTTL();
+ final TDatabaseSchema databaseSchema =
getDatabaseSchemaByName(database);
+ long ttl = databaseSchema.isSetTTL() ? databaseSchema.getTTL() : -1;
if (ttl < 0 || ttl == Long.MAX_VALUE) {
continue;
}