opensearch-project / opensearch-oci-object-storage

OpenSearch Repository Plugin For Oci Object Storage
Apache License 2.0
7 stars 19 forks source link

Compatibility with segment replication #52

Closed dreamer-89 closed 1 year ago

dreamer-89 commented 1 year ago

Summary

With 2.9.0 release, there are lot of enhancements going in for segment replication[1][2] feature (went GA in 2.7.0), we need to ensure different plugins are compatible with current state of this feature. Previously, we ran tests on plugin repos to verify this compatibility but want plugin owners to be aware of these changes so that required updates (if any) can be made. With 2.10.0 release, remote store feature is going GA which internally uses SEGMENT replication strategy only i.e. it enforces all indices to use SEGMENT replication strategy. So, it is important to validate plugins are compatible with segment replication feature.

What changed

1. Refresh policy behavior

  1. RefreshPolicy.IMMEDIATE will only refresh primary shards but not replica shards immediately. Instead post refresh, primary will start a round of segment replication to update the replica shard copies leading to eventual consistency.
  2. RefreshPolicy.WAIT_UNTIL ensures the indexing operation is searchable in your cluster i.e. RAW (Read after write guarantee). With segment replication, this guarantee is not promised due to delay in replica shared updates from asynchronous background refreshes.

2. Refresh lag on replicas

With segment replication, there is inherent delay in documents to be searchable on replica shard copies. This is due to the fact that replica shard copies over data (segment) files from primary. Thus, compared to document replication, there will be on average increase in amount of time the replica shards are consistent with primaries.

3. System/hidden indices support

With https://github.com/opensearch-project/OpenSearch/pull/8200, system and hidden indices are now supported with SEGMENT replication strategy. We need to ensure there are no bottlenecks which prevents system/hidden indices with segment replication.

Next steps

With segment replication strong reads are not guaranteed. Thus, if the plugin needs strong reads guarantees specially as alternative to change in behavior of refresh policy and lag on replicas (point 1 and 2 above), we need to update search requests to target primary shard only. With https://github.com/opensearch-project/OpenSearch/pull/7375, core now supports primary shards only based search. Please follow documentation for examples and details

Open questions

In case of any questions or issues, please post it in core issue

Reference

[1] Design

[2] Documentation

dreamer-89 commented 1 year ago

Request owners to add v2.9.0 label on this issue.

dreamer-89 commented 1 year ago

Hi Plugin Owners, Gentle reminder to look into this issue as code freeze date for 2.9.0 release is near i.e. July 11th.

dreamer-89 commented 1 year ago

Gentle reminder for plugin owners as we are past code freeze date for 2.9.0 release

dreamer-89 commented 1 year ago

@anasalkouz : Do you mind adding 2.10.0 label or close this issue if no change is needed ?

anasalkouz commented 1 year ago

@dreamer-89 Could you double check if anything needed for OCI repo? Otherwise, I will close the issue.

dreamer-89 commented 1 year ago

Don't find any indexing or search request in code references. Thus, closing this issue.