Closed mch2 closed 2 weeks ago
Hi @mch2 I would like to pickup this issue
Reproduced this issue and found that:
SEGMENT
, so that search replicas do not get created when replication type is DOCUMENT
.Extending above mentioned validation adding a detailed validations bellow and marking which needs to be allowed and and which needs to be blocked.
Snapshot created with index.replication.type
: DOCUMENT
with no search replica (note: Search replicas are allowed only in SEGMENT
replication type), can be restored with bellow settings:
Case 1. No explicit index.replication.type
and index.number_of_search_only_replicas
in the settings: Allow
Case 2. No explicit index.replication.type
and index.number_of_search_only_replicas
= 0: Allow
Case 3. index.replication.type
: DOCUMENT
and no explicit index.number_of_search_only_replicas
: Allow
Case 4. index.replication.type
: DOCUMENT
and index.number_of_search_only_replicas
= 0 : Allow
Case 5. index.replication.type
: DOCUMENT
and index.number_of_search_only_replicas
> 0 : Block
Case 6. index.replication.type
: SEGMENT
and no explicit index.number_of_search_only_replicas
: Allow
Case 7. index.replication.type
: SEGMENT
and index.number_of_search_only_replicas
= 0 : Allow
Case 8. index.replication.type
: SEGMENT
and index.number_of_search_only_replicas
> 0 : Allow
Snapshot created with index.replication.type
: SEGMENT
with no search replica.
Case 1. No explicit index.replication.type
and index.number_of_search_only_replicas
in the settings: Allow
Case 2. No explicit index.replication.type
and index.number_of_search_only_replicas
= 0: Allow
Case 3. index.replication.type
: DOCUMENT
and no explicit index.number_of_search_only_replicas
: Allow
Case 4. index.replication.type
: DOCUMENT
and index.number_of_search_only_replicas
= 0 : Allow
Case 5. index.replication.type
: DOCUMENT
and index.number_of_search_only_replicas
> 0 : Block
Case 6. index.replication.type
: SEGMENT
and no explicit index.number_of_search_only_replicas
: Allow
Case 7. index.replication.type
: SEGMENT
and index.number_of_search_only_replicas
= 0 : Allow
Case 8. index.replication.type
: SEGMENT
and index.number_of_search_only_replicas
> 0 : Allow
Snapshot created with index.replication.type
: SEGMENT
with index.number_of_search_only_replicas
> 0
Case 1. No explicit index.replication.type
and index.number_of_search_only_replicas
in the settings: Allow
Case 2. No explicit index.replication.type
and index.number_of_search_only_replicas
= 0: Allow
Case 3. index.replication.type
: DOCUMENT
and no explicit index.number_of_search_only_replicas
: Block
Case 4. index.replication.type
: DOCUMENT
and index.number_of_search_only_replicas
= 0 : Allow
Case 5. index.replication.type
: DOCUMENT
and index.number_of_search_only_replicas
> 0 : Block
Case 6. index.replication.type
: SEGMENT
and no explicit index.number_of_search_only_replicas
: Allow
Case 7. index.replication.type
: SEGMENT
and index.number_of_search_only_replicas
= 0 : Allow
Case 8. index.replication.type
: SEGMENT
and index.number_of_search_only_replicas
> 0 : Allow
With https://github.com/opensearch-project/OpenSearch/issues/15368 we add the ability to create and update an index to have search replicas. We need to also support this configuration on restore. With this issue we should accomplish this while honoring the same validations for search replicas: