Skip to content

Fix ProgressWALIterator search index extraction#18143

Merged
jt2594838 merged 1 commit into
apache:masterfrom
jt2594838:fix_search_index
Jul 13, 2026
Merged

Fix ProgressWALIterator search index extraction#18143
jt2594838 merged 1 commit into
apache:masterfrom
jt2594838:fix_search_index

Conversation

@jt2594838

Copy link
Copy Markdown
Contributor

Summary

  • Extract the real search index from write-plan body entries via SearchNode before falling back to WAL metadata.
  • Prevent ProgressWALIterator from treating encoded search-index flags as the actual search index.

Tests

  • mvn compile -pl iotdb-core/datanode (timed out after 124s in local environment)

@Caideyipi Caideyipi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code change itself looks consistent with the existing WAL decoding path: SearchNode.extractSearchIndex(...) matches how WALInfoEntry#getSearchIndex() and WALNode handle encoded search indexes.

One thing I think we should add before merging is a focused regression test for this exact case. The current ProgressWALIteratorTest#searchableEntry helper writes raw search-index longs, so it would not fail without this fix. Please add a case where the WAL body stores an encoded value, for example SearchNode.encodeSearchIndex(12L, true), and assert that ProgressWALIterator returns search index 12L rather than falling back to metadata or treating the encoded negative value as invalid.

@jt2594838 jt2594838 merged commit 9f069d5 into apache:master Jul 13, 2026
41 of 44 checks passed
@jt2594838 jt2594838 deleted the fix_search_index branch July 13, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants