|
Also merging this into
The idea behind the none-ephemeral node2shards folder is that a node, once its starts, can read it old shard assignments and serve these 'old' shards without download from origin again.
That may be the intent, but in practice, this leads to real problems because many parts of the software assume that the presence of that directory means that the node still exists. I don't believe that the fast-start capability works in any case. Whether my suggestion is taken to heart or not, the way that status and assignments is handled has gotten confused over time. I think a preferable approach would be for a node that is coming back up should simply advertise whatever shards it finds in a complete state. If a node goes down and comes back quickly, then the master should be able to use the advertised shards to guide the assignments it makes. If a node goes down and comes back much later, then the master can still use the advertised shards to guide rebalancing of the cluster. In either case, making the assignment non-ephemeral serves little purpose and the contents of a missing node is of little interest as well. In fact, you might consider putting all state (both from the master and from the node) into a single document. The document could be created on node start with current shard state (if any) and the master could update the document with assignments. As shards go live, the node would update the document repeatedly and the master could decide whether to change the assignment based on what other nodes are doing. This is actually simpler than the current system, no harder to implement and much easier to understand. The dual source of updates isn't a problem either (ZK was made for that and the update rate is low). |
||||||||||||||||||||||||||||||||||||||||
KATTA-43is closely related to this.So is
KATTA-69.And so is KATTA-68