This is an automated email from the ASF dual-hosted git repository.

shuwenwei pushed a commit to branch fixFetchDeviceNotInCache
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit ed94be70888ae6f04764637d6c9acdf6d26b4795
Author: shuwenwei <[email protected]>
AuthorDate: Fri Jul 11 15:43:04 2025 +0800

    Fixed the issue where devices in the cache were repeatedly fetched
---
 .../plan/relational/metadata/fetcher/TableDeviceSchemaFetcher.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableDeviceSchemaFetcher.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableDeviceSchemaFetcher.java
index c2e72e3f2ab..a89c94ea61e 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableDeviceSchemaFetcher.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableDeviceSchemaFetcher.java
@@ -317,8 +317,8 @@ public class TableDeviceSchemaFetcher {
                   .collect(Collectors.toList()));
         } else {
           idx1++;
-          if (idx2 >= tagSingleMatchPredicateNotInCache.size()
-              || i == tagSingleMatchPredicateNotInCache.get(idx2)) {
+          if (idx2 < tagSingleMatchPredicateNotInCache.size()
+              && i == tagSingleMatchPredicateNotInCache.get(idx2)) {
             tagPredicateForFetch.add(
                 index2FilterMapList.get(i).values().stream()
                     .flatMap(Collection::stream)

Reply via email to