default dev clusters to a full peer mesh and wait for a settled partition map - #156
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mqdb dev start-clusternow defaults to thefulltopology, and the clusters started by the ownership, sharing and presence suites give every node every other node in--peers. The cluster requires that, and the README documents it. The old default,partial(each node lists only lower-numbered nodes), stays selectable for reproducing cluster raft: two leaders can be elected in the same term #155.mqdb dev testnow waits until every node reports the same complete partition map, with every started node holding primaries, for three consecutive polls. Before, it only checked that every node accepted a connection and slept 2 s. On a full mesh that leaves the partitions unassigned, so the first write got503 partition not local.docs/distributed-design.md:fullis listed as the default. The stale advice to usepartial/upperin production (from the deprecated MQTT bridge, issue 11.16) is replaced with the full-peer-list requirement.Test plan
cargo make clippycargo make testmqdb dev test --ownership: 8/8 clean on this branch, against 4/8 on main (where 4 runs failed with the cluster: a record created just before a partition handoff is missing on the new primary #153 404 on update/delete).--sharing: 8/8 clean on this branch, against 5/8 on main.--presence: 3/3.mqdb dev start-cluster(default topology) plusmqdb dev test --all, 2 runs: pubsub 20/20, db 10/10, wildcards, retained and lwt all pass.constraint addgets a retryable503 unique reservation ... not yet durablefor about 8 s, and the test waits 500 ms. That is a test-timing issue and is not addressed here.