Skip to content

PHOENIX-8091 IndexToolForNonTxGlobalIndexIT incremental rebuild test writes in one millisecond - #2723

Merged
apurtell merged 1 commit into
apache:masterfrom
apurtell:PHOENIX-8091
Dec 5, 2026
Merged

apurtell merged 1 commit into
apache:masterfrom
apurtell:PHOENIX-8091

Conversation

@apurtell

@apurtell apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

The incremental rebuild test with a page size fails sometimes in CI. Two subclasses inherit the test and fail in the same way. The test commits an upsert, a delete and an upsert before it creates the index. The region server sets the cell timestamps. The index region observer puts each batch in its own millisecond only when the table has an index. Thus two adjacent batches can share a timestamp. A delete then masks the put with the same timestamp, and the rebuild finds fewer rows. This is normal HBase behavior.

This change is test-only. The test sleeps for one millisecond after each of the first two commits, so the next batch gets a later timestamp. The fix does not wait on the injected clock, because that wait can hang when a test freezes the clock.

🤖 Generated with Claude Code

…writes in one millisecond

The table has no index when the test writes its rows, so the server does not
keep batch timestamps apart. When a delete and the earlier put get the same
timestamp, the delete masks the put, and the rebuild counts too few rows.
Wait one millisecond after each of the first two commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the test-only change separating mutation-batch timestamps.

No open issues 🎉

What changed in this PR

This test-only change addresses intermittent incremental index rebuild failures caused by adjacent mutation batches sharing a timestamp.

Changes:

  • Adds one-millisecond sleeps after the first two commits to separate batch timestamps.
  • Documents why timestamp separation is needed before the index exists.
File Description
phoenix-core/​src/​it/​java/​org/​apache/​phoenix/​end2end/​IndexToolForNonTxGlobalIndexIT.java Separates commits in the page-size incremental rebuild test without waiting on the injected clock.

Review effort: Balanced

@apurtell

apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

Precommit note: the failures in this run are not related to this change. Each one is a known problem on master.

(Claude Code)

@apurtell
apurtell merged commit 75bfa7b into apache:master Dec 5, 2026
10 of 13 checks passed
@apurtell
apurtell deleted the PHOENIX-8091 branch December 5, 2026 19:23
asf-gitbox-commits pushed a commit that referenced this pull request Dec 5, 2026
…writes in one millisecond (#2723)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Andrew Purtell <apurtell@salesforce.com>
asf-gitbox-commits pushed a commit that referenced this pull request Dec 5, 2026
…writes in one millisecond (#2723)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Andrew Purtell <apurtell@salesforce.com>
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