Writes with offline primary and no replicas

I had a ticket open with support on this but they could not explain what would happen so trying here.

Single index, multiple primaries spread across multiple nodes, 0 replicas. Do writes continue if 1 of the primaries of an index is offline or does the index become un-writeable?

For example in my test, I created an index with 2 primary shards (P0/1) and 0 replicas. The primaries are distributed across node A and B.

While indexing data I stopped the service on B, thus P1 becomes unassigned/unavailable. As there are no replicas to become primaries the cluster goes red. Search results immediately show half the data as expected, but it looks like writes also stopped which is surprising.

I would have assumed all writes would have gone to the remaining active primary shard that was still available?

That sounds like the correct and expected behaviour. Writing to red indices is not allowed. This has to be the case as updates and deletes are supported.

1 Like

Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.