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 58dacb12501 Fixed the bug that table cache is forced refreshed each
time (#13703)
58dacb12501 is described below
commit 58dacb12501ddf4345540a44b5b3cefd6394e765
Author: Caideyipi <[email protected]>
AuthorDate: Thu Oct 10 12:02:58 2024 +0800
Fixed the bug that table cache is forced refreshed each time (#13703)
---
.../apache/iotdb/db/schemaengine/table/DataNodeTableCache.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/table/DataNodeTableCache.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/table/DataNodeTableCache.java
index 8f8e7c5f14c..13aeff55c87 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/table/DataNodeTableCache.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/table/DataNodeTableCache.java
@@ -215,7 +215,16 @@ public class DataNodeTableCache implements ITableCache {
try {
return preUpdateTableMap.containsKey(database)
&& preUpdateTableMap.get(database).containsKey(tableName)
+ &&
Objects.nonNull(preUpdateTableMap.get(database).get(tableName).getLeft())
? preUpdateTableMap.entrySet().stream()
+ .filter(
+ entry -> {
+ entry
+ .getValue()
+ .entrySet()
+ .removeIf(tableEntry ->
Objects.isNull(tableEntry.getValue().getLeft()));
+ return !entry.getValue().isEmpty();
+ })
.collect(
Collectors.toMap(
Map.Entry::getKey,