Skip to content

[QA EPIC] OpenSearch Migration — End-to-End QA Validation (Phases 0–3) #35476

@fabrizzio-dotCMS

Description

@fabrizzio-dotCMS

Description

QA sub-epic for the ES → OpenSearch migration pipeline under #34164. Covers end-to-end validation of the dual-write pipeline across Phases 0, 1, and 2 (partial), plus acceptance criteria for PR #35632 (startup hardening).

Parent epic: #34164 — Migrate Mapping Layer classes
Fix PR: #35632 — Startup validation hardening, haltMigration(), phase-aware index init, thread-safe formatter
Test plans:

Environment Setup

# Start migration stack (ES 7.10 + Kibana + OpenSearch 3.x + Dashboards)
docker compose -f docker/docker-compose-examples/os-migration/docker-compose.yml up -d
Service URL Purpose
Elasticsearch 7.10 http://localhost:9200 ES REST API
Kibana http://localhost:5601 ES index inspection / queries
OpenSearch 3.x http://localhost:9201 OS REST API
OpenSearch Dashboards http://localhost:5602 OS index inspection / queries
# dotmarketing-config.properties — minimal OS connection
OS_ENDPOINTS=http://localhost:9201
OS_AUTH_TYPE=BASIC
OS_AUTH_BASIC_USER=admin
OS_AUTH_BASIC_PASSWORD=admin
OS_TLS_ENABLED=false

# Phase flag: 0=ES only  1=dual-write+ES reads  2=dual-write+OS reads  3=OS only (NOT TESTABLE)
FEATURE_FLAG_OPEN_SEARCH_PHASE=0

Migration Phase Reference

Phase Writes Reads ES Status OS Write Failures Testable?
0 ES only ES only Active n/a Yes — fully
1 ES + OS ES only Active Fire-and-forget (logged) Yes — fully
2 ES + OS OS only Active (fallback) Fire-and-forget (logged) Partially — writes only
3 OS only OS only Decommissioned Propagate to caller No — query layer not migrated

Scope

  1. Zero regression on ES-backed functionality (Phase 0 baseline)
  2. Correct dual-write in Phase 1 — every ES write is mirrored to OS; OS failures are fire-and-forget
  3. NEW (PR fix(os-migration): harden startup validation, add emergency halt path, fix thread-safe formatter #35632): haltMigration() auto-resets phase to 0 when OS is unreachable or has the wrong version at startup
  4. NEW (PR fix(os-migration): harden startup validation, add emergency halt path, fix thread-safe formatter #35632): hasEmptyIndices() is phase-aware — empty OS index in Phase 1 does not trigger a false ES reindex
  5. NEW (PR fix(os-migration): harden startup validation, add emergency halt path, fix thread-safe formatter #35632): threadSafeTimestampFormatter prevents corrupted index names under concurrent requests
  6. Index lifecycle operations (activate, deactivate, delete, reindex) — including ES-only vs OS-only name variants
  7. Content Type and contentlet create/delete sync between ES and OS shadow index
  8. Multi-node cluster startup consistency in Phase 1
  9. Invalid OS_ENDPOINTS graceful degradation
  10. REST API security: DELETE /v1/esindex requires admin authentication
  11. Complex query equivalence between Kibana and OpenSearch Dashboards

DB Validation Queries

-- All index rows
SELECT * FROM indicies ORDER BY index_name;
-- OS rows only (os:: prefix = DB artifact, never visible to callers)
SELECT * FROM indicies WHERE index_name LIKE 'os::%';
-- Count per provider
SELECT CASE WHEN index_name LIKE 'os::%' THEN 'OS' ELSE 'ES' END AS provider, COUNT(*) FROM indicies GROUP BY 1;
-- Expected Phase 0: 2 rows (ES only). Expected Phase 1 fresh: 4 rows (2 ES + 2 OS).

Child Tasks

PR #35632 Acceptance & Startup Hardening

Cluster & Infrastructure

Content Lifecycle Sync

Index Lifecycle

Security & Query Validation

Acceptance Criteria

Additional Context

Depends on: #34164
Fix PR: #35632

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Current Sprint Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions