Skip to content

PHOENIX-7996 :- Correctly maintain immutable global indexes on the server side for partial upserts (5.3) - #2703

Draft
lokiore wants to merge 2 commits into
apache:5.3from
lokiore:PHOENIX-7996-5.3
Draft

lokiore wants to merge 2 commits into
apache:5.3from
lokiore:PHOENIX-7996-5.3

Conversation

@lokiore

@lokiore lokiore commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

JIRA: https://issues.apache.org/jira/browse/PHOENIX-7996

Backport of #2611 (master commit 96c05a4) to 5.3.

What changes were proposed in this pull request?

Cherry-pick of the master change. It makes server-side maintenance of immutable, global, non-transactional indexes correct for partial upserts. DEFAULT_SERVER_SIDE_IMMUTABLE_INDEXES_ENABLED stays false on 5.3, as on master. Thus there is no change to the default behavior.

  • All data-table gates use IndexUtil.isServerSideImmutableIndexMaintenanceEnabled(...). Immutable tables with a ROW_TIMESTAMP column stay client-maintained.
  • IndexRegionObserver reads back the current row for an immutable batch with a covered or uncovered global index when a mutation omits one of that index's on-disk columns.
  • The immutable server-serialize filter uses IndexUtil.isGlobalIndex, so uncovered global immutable indexes with a matching storage scheme are maintained.

See #2611 for the full description.

Backport note: one conflict in IndexRegionObserver.java. The new isPartialGlobalIndexMutation method is next to getPendingContext, which 5.3 has from PHOENIX-8053. Both methods are kept. Other files applied cleanly.

Why are the changes needed?

Same as #2611. Without this change, when phoenix.server.side.immutable.indexes.enabled=true, a partial upsert can drop a covered column from the index or write a null-keyed uncovered index entry, and an uncovered global immutable index can get no updates.

Does this PR introduce any user-facing change?

No default behavior change. When the flag is enabled, the behavior is the same as on master after #2611.

How was this patch tested?

On 5.3 (JDK 8), the change compiles and these ITs pass locally:

  • ServerSideImmutableIndexIT: 95 run, 0 failures, 10 skipped
  • ClientSideImmutableIndexIT: 95 run, 0 failures, 10 skipped
  • GlobalIndexCheckerIT: 116 run, 0 failures, 6 skipped
  • DeleteIT: 74 run, 0 failures

The skips come from @Ignore and Assume guards that are already on 5.3. This PR adds none.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 5.5)

🤖 Generated with Claude Code

…r side for partial upserts (apache#2611)

Co-authored-by: lokesh-khurana <lokesh.khurana@salesforce.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 96c05a4)
Generated-by: Claude Code (Opus 5.5)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@lokiore lokiore changed the title PHOENIX-7996 Correctly maintain immutable global indexes on the server side for partial upserts (5.3) PHOENIX-7996 :- Correctly maintain immutable global indexes on the server side for partial upserts (5.3) Nov 23, 2026
@lokiore lokiore added the backport Backport PR label Nov 23, 2026
Generated-by: Claude Code (Opus 5.5)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backport PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant