This is an automated email from the ASF dual-hosted git repository.
jt2594838 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 9f069d5c7c5 Fix that ProgressWALIterator may read incorrect
searchIndex (#18143)
9f069d5c7c5 is described below
commit 9f069d5c7c56aaf0aeda4c198d75f9738a5d677e
Author: Jiang Tian <[email protected]>
AuthorDate: Mon Jul 13 10:28:08 2026 +0800
Fix that ProgressWALIterator may read incorrect searchIndex (#18143)
---
.../iotdb/db/subscription/broker/consensus/ProgressWALIterator.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ProgressWALIterator.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ProgressWALIterator.java
index 359715d9467..8fd23042ea9 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ProgressWALIterator.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/broker/consensus/ProgressWALIterator.java
@@ -24,6 +24,7 @@ import org.apache.iotdb.commons.request.IConsensusRequest;
import org.apache.iotdb.consensus.common.request.IndexedConsensusRequest;
import org.apache.iotdb.consensus.common.request.IoTConsensusRequest;
import org.apache.iotdb.db.i18n.DataNodePipeMessages;
+import org.apache.iotdb.db.queryengine.plan.planner.plan.node.write.SearchNode;
import org.apache.iotdb.db.storageengine.dataregion.wal.buffer.WALEntryType;
import org.apache.iotdb.db.storageengine.dataregion.wal.buffer.WALInfoEntry;
import org.apache.iotdb.db.storageengine.dataregion.wal.io.ProgressWALReader;
@@ -461,7 +462,7 @@ public class ProgressWALIterator implements Closeable,
Iterator<IndexedConsensus
return metadataSearchIndex;
}
buffer.position(SEARCH_INDEX_OFFSET);
- final long bodySearchIndex = buffer.getLong();
+ final long bodySearchIndex =
SearchNode.extractSearchIndex(buffer.getLong());
return bodySearchIndex >= 0 ? bodySearchIndex : metadataSearchIndex;
}