Skip to content

Parallelize index metadata migration in EsMetadataMigrationPipeline #2495

@AndreKurait

Description

@AndreKurait

Description

EsMetadataMigrationPipeline.migrateAll() currently migrates index metadata sequentially using concatMap. Since index creation is independent across indices, this could be parallelized for better performance on clusters with many indices.

Current Behavior

Flux.fromIterable(indices)
    .concatMap(indexName -> migrateIndexMetadata(indexName).thenReturn(indexName))

Proposed Change

Replace concatMap with flatMap and a bounded concurrency:

Flux.fromIterable(indices)
    .flatMap(indexName -> migrateIndexMetadata(indexName).thenReturn(indexName), 5)

A default concurrency of 5 should be safe since index creation operations are independent.

Context

Identified during PR review of the RfsPipeline refactor. Kept sequential to match existing behavior and limit PR scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions