fix(os-index): resolve getIndexDocumentCount physical name via the read provider (.os tag) (#36501)#36558
Open
fabrizzio-dotCMS wants to merge 1 commit into
Open
fix(os-index): resolve getIndexDocumentCount physical name via the read provider (.os tag) (#36501)#36558fabrizzio-dotCMS wants to merge 1 commit into
fabrizzio-dotCMS wants to merge 1 commit into
Conversation
…ad provider (.os tag) (#36501) ContentletIndexAPIImpl.getIndexDocumentCount(String) resolved the physical index name with indexAPI.getNameWithClusterIDPrefix(indexName), which adds the cluster prefix but NOT the .os tag. Under migration phase 2/3 the read provider is OpenSearch, whose indices are .os-tagged, so the lookup hit a non-existent index ("no such index [cluster_....working_...]" without the .os suffix) and threw. Resolve the physical name through the read provider's own toPhysicalName() — which adds the cluster prefix for ES and the prefix + .os tag for OS — mirroring the sibling getIndexDocumentCount(String, IndexTag) overload. (Fixes ContentletIndexAPIImplTest.testGetIndexDocumentCountSuccess under phase 2.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 tasks
Contributor
|
Claude finished @fabrizzio-dotCMS's task in 2m 11s —— View job Rollback-Safety Analysis
Verdict: Safe to roll back. No unsafe category applies. The change only affects
If rolled back, N-1 simply reverts to the old (buggy) prefix-resolution behavior for this one internal helper — no persisted state, index mapping, or API contract is affected either way. Label |
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.
Proposed Changes
ContentletIndexAPIImpl.getIndexDocumentCount(String)resolved the physical name withgetNameWithClusterIDPrefix(cluster prefix but no.ostag). Under ES→OS migration phase 2/3 the read provider is OpenSearch, whose indices are.os-tagged, so the lookup hit a non-existent index and threw. Now resolves via the read provider's owntoPhysicalName()(ES: prefix only; OS: prefix +.os), mirroring the siblinggetIndexDocumentCount(String, IndexTag)overload. Contributes to #36501.Verification
Phase 2, isolated env:
ContentletIndexAPIImplTest#testGetIndexDocumentCountSuccess1/0/0 (previously failing).Refs #36501, #36320.