OpenSearch icon indicating copy to clipboard operation
OpenSearch copied to clipboard

[BUG] Pull-based ingestion fails with remote cluster state due to missing XContent serialization

Open SwethaGuptha opened this issue 1 year ago • 2 comments

Describe the bug

Starting with OpenSearch 2.17, remote cluster state publication is supported. The experimental pull-based ingestion feature(https://github.com/opensearch-project/OpenSearch/issues/17442) introduced an ingestionStatus field in IndexMetadata(https://github.com/opensearch-project/OpenSearch/pull/17631). However, this field is only serializable via byte streams and is missing from IndexMetadata.toXContent() https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java#L2163-L2269. The XContent object is used in:

  1. /_cluster/state rest API - to fetch the cluster state
  2. Remote cluster state is serialized and de-serialized as XContent.

Due to the miss, nodes in clusters using remote store for cluster state publication cannot receive ingestionStatus updates, breaking pull-based ingestion functionality.

Related component

Indexing

To Reproduce

A 3.1 cluster.

Expected behavior

Add XContent Serialisation

Additional Details

No response

SwethaGuptha avatar Sep 15 '25 04:09 SwethaGuptha

@varunbharadwaj @yupeng9 Please take a look at this.

SwethaGuptha avatar Sep 15 '25 04:09 SwethaGuptha

Thanks for catching @SwethaGuptha. Will take a look.

varunbharadwaj avatar Sep 15 '25 04:09 varunbharadwaj