Skip to content

[QA-E] OpenSearch Migration — Scenario E: Index Name Scenarios #35481

@fabrizzio-dotCMS

Description

@fabrizzio-dotCMS

Description

Validate index naming behavior for two key scenarios: a clean install starting directly in Phase 1, and a production-style migration catchup where an existing ES index is present when Phase 2 is first activated.

Parent sub-epic: #35476
Parent epic: #34164
Test plan reference: Section 9 — Scenario E

Acceptance Criteria

E-1 — Fresh install (same index name in ES and OS):

  • Start a clean dotCMS instance (no existing indices) with FEATURE_FLAG_OPEN_SEARCH_PHASE=1. Bootstrap creates both ES and OS indices simultaneously.
  • indicies DB table has two rows per logical index: one plain ES name, one os:: prefixed OS name. Both share the same timestamp.
  • Both indices exist in Kibana and OS Dashboards with the same logical name (e.g., cluster_<id>.working_20260421...).
  • Publish content. Document appears in both ES and OS with identical content. Record counts are equal.

E-2 — Migration catchup (different index names per provider):

  • Start dotCMS in Phase 0. Create content. ES index cluster_<id>.working_<old_timestamp> present. indicies table has one row per logical index (no os:: rows).
  • Stop dotCMS. Set FEATURE_FLAG_OPEN_SEARCH_PHASE=2. Restart.
  • dotCMS detects no OS index. Creates a new OS index with a new timestamp (different from the ES index timestamp).
  • indicies table shows two rows for the working index: cluster_<id>.working_<old> (ES) and os::cluster_<id>.working_<new> (OS). Timestamps are different.
  • ES index (old timestamp) has existing content. OS index (new timestamp) is initially empty.
  • Publish a new content item. Item appears in both ES (write to old index) and OS (write to new index).
  • Startup log notes the name divergence. No error. dotCMS operational.
  • GET /v1/esindex lists both indices with their respective timestamps.

Additional Context

DB validation queries:

-- Verify rows per provider
SELECT
  CASE WHEN index_name LIKE 'os::%' THEN 'OS' ELSE 'ES' END AS provider,
  COUNT(*) AS row_count
FROM indicies
GROUP BY 1;

-- OS rows only
SELECT * FROM indicies WHERE index_name LIKE 'os::%';

Depends on: #35476

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions