You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "Copilot (via GitHub)" <gi...@apache.org> on 2026/09/02 20:04:59 UTC
Re: [PR] PHOENIX-7996 Enable server-side maintenance of immutable indexes by default [phoenix]
Copilot commented on code in PR #2611:
URL: https://github.com/apache/phoenix/pull/2611#discussion_r3918152354
##########
phoenix-core-client/src/main/java/org/apache/phoenix/index/IndexMaintainer.java:
##########
@@ -198,11 +196,9 @@ public static Iterator<PTable> maintainedLocalOrGlobalIndexesWithoutMatchingStor
return Iterators.filter(indexes, new Predicate<PTable>() {
@Override
public boolean apply(PTable index) {
- return sendIndexMaintainer(index) && ((index.getIndexType() == IndexType.GLOBAL
+ return sendIndexMaintainer(index) && ((IndexUtil.isGlobalIndex(index)
&& (dataTable.getImmutableStorageScheme() != index.getImmutableStorageScheme()
- || connection.getQueryServices().getConfiguration().getBoolean(
- SERVER_SIDE_IMMUTABLE_INDEXES_ENABLED_ATTRIB,
- DEFAULT_SERVER_SIDE_IMMUTABLE_INDEXES_ENABLED)))
+ || IndexUtil.isServerSideImmutableIndexMaintenanceEnabled(dataTable, connection)))
Review Comment:
The storage-scheme mismatch branch bypasses the new `ROW_TIMESTAMP` guard. For an immutable `ROW_TIMESTAMP` table whose global index uses a different immutable storage scheme, `getClientMaintainedIndexes` excludes that index because the schemes differ, while this predicate still serializes it because the left side of the `||` is true. `IndexRegionObserver` will therefore remain the sole maintainer and `setTimestamps` will replace the user timestamp, contradicting the carve-out and preserving the range-scan/SCN corruption described by this PR. Please make the client/server routing cover this combination explicitly (either safely client-maintain it or preserve row timestamps in the required server read-back path).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@phoenix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org