task(ESMappingApiImpl integration) Refs:34933#35275
Conversation
|
Claude finished @fabrizzio-dotCMS's task in 3m 0s —— View job PR Review: issue-34933-integration-1
Findings[CRITICAL] Validator exception swallowed —
Fix: catch and re-throw before the generic handler: } catch (DotRuntimeException e) {
throw e; // validator fail-fast must propagate
} catch (Exception e) {
Logger.fatal(this.getClass(), "Failed to create new indexes:" + e.getMessage(), e);
}[MEDIUM] Hardcoded OS 3.x version check —
[MEDIUM] The manual nested loop in [MEDIUM] It never references [LOW] Redundant migration phase condition —
[LOW] This new overload is added to the concrete class only, not to [INFO] Endpoint overlap check is documented as best-effort but the gap is wider than the docs suggest
The |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is kicking off a free cloud agent to fix these issues. This run is complimentary, but you can enable autofix for all future PRs in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 615ec62. Configure here.
|
You have used all of your free Bugbot PR reviews. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
Rollback analysis complete - label added. |
|
You have used all of your free Bugbot PR reviews. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
Rollback analysis complete - label added. |

Summary
This PR is a subset of a larger ES → OpenSearch migration initiative (issue #34933). The changes have been split into multiple focused PRs; a follow-up PR with additional migration logic is coming after this one.
Introduces the foundational infrastructure for the ES → OpenSearch (OS) migration: startup validation,
IndexTag-based targeted routing, documentation, and a Docker Compose stack for running both backends side-by-side.Changes
Infrastructure & Tooling
docker/docker-compose-examples/single-node-os-migration/) — runs ES 7.9.1 and OS 3.4.0 side-by-side with dotCMS, Kibana, and OS Dashboards; designed to validate dual-write before promoting OS as primaryDocumentation
OPENSEARCH_MIGRATION.md— migration phases, shadow index strategy, index architecture, write pipeline, dispatch model, known gotchas, rollback risksOPENSEARCH_CLIENT_CONFIGURATION.md— full reference for allOS_*config properties with ES fallback mapping, defaults, and examplesBackend — Routing & Mapping
ESMappingAPIImpl— addedputMapping(List, String, IndexTag)targeted overload; routes to a single provider (ES or OS) identified byIndexTag, bypassing phase fan-out; preserves original phase-dispatch overload unchangedESMappingUtilHelper— implements newMappingHelperinterface; made fieldsfinal; addsIndexTag-overloadedaddCustomMappingvariants for targeted catchup operationsMappingHelper— new interface extracted fromESMappingUtilHelperIndexTag— new enum/utility class that identifies the target vendor (ES vs OS) for targeted routing operationsPhaseRouter— minor additions to exposeosImpl()andesImpl()accessor methodsBackend — Startup & Init
IndexStartupValidator— new class; validates OS version (3.x) and endpoint separation from ES at startup; invoked fromContentletIndexAPIImpl.checkAndInitialiazeIndex()whenever the migration phase is activeContentletIndexAPIImpl— callsIndexStartupValidator.validateIndexingConfig()during index init when migration is started, reads are enabled, or migration is completeDotCMSInitDb— minor additions (16 lines) related to migration startup wiringESMigrationUtil— removed 82 lines of code replaced by the new infrastructurePermissionBitFactoryImpl— removed 10 lines of obsolete migration-related codeESIndexAPI— minor code style improvement ingetIndices()(no behavioral change)Testing
IndexTagdispatch andIndexStartupValidatorpaths is tracked in issue [TASK] Migrate ESMappingAPIImpl #34933 and expected in the follow-up PRsingle-node-os-migrationDocker Compose stack and verify that dotCMS starts cleanly with both backends runningBreaking Changes
None. All changes are additive or internal. Existing ES behavior is preserved; the new
putMappingoverload withIndexTagis a new method, not a replacement.This PR fixes: #34933
Note
Medium Risk
Touches search-index initialization and mapping write paths; the new startup validator can fail fast on misconfiguration and the new targeted mapping routing changes how mappings are applied during migration scenarios.
Overview
Adds foundational ES→OpenSearch migration scaffolding: a new
IndexTagutility andIndexTag-based overloads to target mapping updates at a single backend (vs phase fan-out), plusPhaseRouteraccessors to support that routing.Introduces
IndexStartupValidatorand wires it into index initialization (ContentletIndexAPIImpl.checkAndInitialiazeIndex()and DB bootstrap viaDotCMSInitDb) to validate OpenSearch version and ensure ES/OS endpoints don’t overlap before startup proceeds.Cleans up legacy/obsolete code (removes
ESMigrationUtiland ES bulk-indexing remnants inPermissionBitFactoryImpl), adds a single-node docker-compose stack to run ES+OS side-by-side, and adds documentation for OpenSearch config and the migration/dispatch model.Reviewed by Cursor Bugbot for commit 615ec62. Bugbot is set up for automated code reviews on this repo. Configure here.
This PR fixes: #34933