[BUG] Pull-based ingestion fails with remote cluster state due to missing XContent serialization
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:
- /_cluster/state rest API - to fetch the cluster state
- 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
@varunbharadwaj @yupeng9 Please take a look at this.
Thanks for catching @SwethaGuptha. Will take a look.