Skip to content

PHOENIX-8114 UpgradeIT view index sequence tests race their own sequence creates - #2746

Open
apurtell wants to merge 1 commit into
apache:masterfrom
apurtell:PHOENIX-8114
Open

apurtell wants to merge 1 commit into
apache:masterfrom
apurtell:PHOENIX-8114

Conversation

@apurtell

@apurtell apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

The tests that merge view index sequences sometimes fail because a sequence is not found. Which test fails changes from run to run.

The tests race their own writes at millisecond resolution. A sequence read sees only cells written before the read timestamp. The test creates the legacy sequences at the current time, and the merge also creates its new sequence at the current time. When a create and the next increment fall in the same millisecond, the increment fails. This change is test-only. The test now creates the legacy sequences one millisecond in the past. The increment after the merge reads at the latest timestamp, as NEXT VALUE FOR does without an SCN. The expected values do not change.

🤖 Generated with Claude Code

…nce creates

The merge test creates sequences at the current time and then reads them at a
new current time. A sequence read sees only cells older than its timestamp, so a
create and a read in the same millisecond gives SequenceNotFoundException. The test
now creates legacy sequences one millisecond in the past, and it reads the sequence
that the merge creates at LATEST_TIMESTAMP.

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

No active review issues are recorded for the test-only timestamp adjustments in UpgradeIT.

No open issues 🎉

What changed in this PR

This test-only change addresses millisecond timestamp races in UpgradeIT view index sequence merge tests without changing expected values.

Changes:

  • Create legacy sequences one millisecond in the past so subsequent reads can see them.
  • Use HConstants.LATEST_TIMESTAMP for the post-merge increment, matching reads without an SCN.
File Description
phoenix-core/​src/​it/​java/​org/​apache/​phoenix/​end2end/​UpgradeIT.java Adjust sequence creation and read timestamps to prevent intermittent test failures.

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)

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