Skip to content

feat: add global OpenSearch index prefix support (#8489)#8514

Open
mezzeddinee wants to merge 2 commits intoDIRACGrid:integrationfrom
mezzeddinee:feature/8489-opensearch-global-index-prefix
Open

feat: add global OpenSearch index prefix support (#8489)#8514
mezzeddinee wants to merge 2 commits intoDIRACGrid:integrationfrom
mezzeddinee:feature/8489-opensearch-global-index-prefix

Conversation

@mezzeddinee
Copy link
Copy Markdown

@mezzeddinee mezzeddinee commented Apr 14, 2026

Fixes #8489 by introducing index prefixing as a global OpenSearch setting and removing MonitoringDB-local prefix handling.

What changed

  • src/DIRAC/ConfigurationSystem/Client/Utilities.py

    • Read /Systems/NoSQLDatabases/IndexPrefix in getElasticDBParameters.
    • Normalize value (strip().lower()) and pass it as IndexPrefix.
  • src/DIRAC/Core/Base/ElasticDB.py

    • Read global IndexPrefix from DB parameters.
    • Forward it to ElasticSearchDB as globalIndexPrefix.
  • src/DIRAC/Core/Utilities/ElasticSearchDB.py

    • Added globalIndexPrefix constructor parameter and property setter.
    • Added _withGlobalPrefix() helper to prepend the global prefix to index names/patterns.
    • Applied prefixing across index/template/search/read/write/delete operations.
    • Refactored bulk_index flow to avoid apparent double-prepending.
  • src/DIRAC/MonitoringSystem/DB/MonitoringDB.py

    • Removed MonitoringDB-specific IndexPrefix lookup from CS.
    • Rely on inherited global prefix mechanism via ElasticDB.
  • docs/source/AdministratorGuide/ExternalsSupport/index.rst

    • Documented IndexPrefix under Systems/NoSQLDatabases and clarified it is lower-case.
  • docs/source/AdministratorGuide/Systems/MonitoringSystem/index.rst

    • Updated docs to reference global Systems/NoSQLDatabases/IndexPrefix.
  • src/DIRAC/Core/scripts/install_full.cfg

    • Added commented example for global IndexPrefix under NoSQLDatabases.

@mezzeddinee mezzeddinee marked this pull request as draft April 14, 2026 08:01
Comment thread docs/source/AdministratorGuide/ExternalsSupport/index.rst Outdated
Comment thread src/DIRAC/Core/Utilities/ElasticSearchDB.py Outdated
Comment thread src/DIRAC/Core/Utilities/ElasticSearchDB.py Outdated
Comment thread src/DIRAC/Core/Utilities/ElasticSearchDB.py Outdated
Comment thread src/DIRAC/Core/Utilities/ElasticSearchDB.py
@aldbr
Copy link
Copy Markdown
Contributor

aldbr commented Apr 15, 2026

Note: @mezzeddinee if you updated your PR and you want a reviewer having another look at it, please mark it as "Ready for review", cheers

@mezzeddinee
Copy link
Copy Markdown
Author

Note: @mezzeddinee if you updated your PR and you want a reviewer having another look at it, please mark it as "Ready for review", cheers
Addressed all requested changes in 8a86d4d (docs lower-case note, globalIndexPrefix property, removed list/tuple branch, bulk_index double-prefix fix). PR is now ready for re-review.

@mezzeddinee mezzeddinee marked this pull request as ready for review April 18, 2026 08:01
@mezzeddinee mezzeddinee force-pushed the feature/8489-opensearch-global-index-prefix branch from 8a86d4d to 48da361 Compare April 18, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Introduce the concept of a global prefix for OpenSearch indexes

3 participants