Repository navigation
PHOENIX-8091 IndexToolForNonTxGlobalIndexIT incremental rebuild test writes in one millisecond - #2723
Merged
Merged
Conversation
…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>
There was a problem hiding this comment.
🟢 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
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) |
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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