Skip to content

[Remote Store] With remote translog, revisit write request response - _shard.successful/_shard.total  #5435

Open
@ashking94

Description

Is your feature request related to a problem? Please describe.
Currently in logical (document) replication, a request gets fanned out to replication target from the primary, if replicas are configured and active. With remote translog (on top of segment replication), the translog generated locally would be uploaded to remote store. The replicas would be used for primary term validation as mentioned in #3706.

So, if, lets say, there are 2 replica shards, then a write response would contain a node on _shards-

{
  "_index": "test1_segment",
  "_id": "SSaWyIQBb4oiQ9uHCvge",
  "_version": 1,
  "result": "created",
  "_shards": {
    "total": 3,
    "successful": 3,
    "failed": 0
  },
  "_seq_no": 1,
  "_primary_term": 1
}

Here, it means the request was replicated in 3 (1 primary + 2 replicas) shards in total.

With remote store, since the request is not replicated across replicas (unless the primary is relocating), we have to revisit if we should consider replicas (without local translog) in _shards calculation.

Following points has to be considered -

  • how is the _shards field used today by the clients?
  • replication definition of write requests

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Assignees

No one assigned

    Labels

    Storage:DurabilityIssues and PRs related to the durability frameworkenhancementEnhancement or improvement to existing feature or request

    Type

    No type

    Projects

    • Status

      🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions