Allocate primary shard based on allocation IDs #14739

Closed
ywelsch opened this Issue Nov 13, 2015 · 0 comments

Projects

None yet

3 participants

@ywelsch
Contributor
ywelsch commented Nov 13, 2015

Persist allocation IDs of active shards in cluster state and use them to recover correct shards upon cluster restart (i.e., we can recover with only one copy and we make sure we recover the right ones and not a stale copy left around).

Relates to #14671

Steps

  • Persist allocation ID with shard state metadata on nodes (#14831).
  • Persist currently started allocation IDs to index metadata (#14964).
  • Add allocation IDs to TransportNodesListGatewayStartedShards action. Use the above to assign a primary shard on recovery. In particular, don't assign a stale copy (#15281).
  • Extend reroute with an option to force assign a stale copy. This is only relevant for primaries (#15708).
  • Prioritize old primaries when choosing out existing and previously active allocationIds (#16096).
  • Persist shard state immediately and not only on shard activation. This will help solving a race condition on primary relocation where the master has activated the target shard (removing old copy from the active set list) but the cluster crashes before the target node persisted the shard state (#16625)
  • Remove version from ShardRouting (#16243).
@ywelsch ywelsch self-assigned this Nov 13, 2015
@clintongormley clintongormley added :Allocation and removed :Cluster labels Nov 17, 2015
@ywelsch ywelsch closed this Feb 29, 2016
@Mpdreamz Mpdreamz added a commit to Mpdreamz/elasticsearch that referenced this issue Apr 25, 2016
@Mpdreamz Mpdreamz Document missing shard version in routing table of cluster state
as breaking change

removed as per: elastic#16243

because of: elastic#14739
b6ba191
@Mpdreamz Mpdreamz added a commit that referenced this issue Apr 26, 2016
@Mpdreamz Mpdreamz Document missing shard version in routing table of cluster state (#17945
)

as breaking change

removed as per: #16243

because of: #14739
166cfce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment