Skip to content

default dev clusters to a full peer mesh and wait for a settled partition map - #156

Merged
fabracht merged 2 commits into
mainfrom
dev-full-mesh
Oct 3, 2026
Merged

fabracht merged 2 commits into
mainfrom
dev-full-mesh

Conversation

@fabracht

@fabracht fabracht commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • mqdb dev start-cluster now defaults to the full topology, 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 test now 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 got 503 partition not local.
  • docs/distributed-design.md: full is listed as the default. The stale advice to use partial/upper in production (from the deprecated MQTT bridge, issue 11.16) is replaced with the full-peer-list requirement.
  • The partition-map wait moves here from upgrade mqtt5 to 0.45.1 #154, which will be rebased to contain only the mqtt5 upgrade.

Test plan

  • cargo make clippy
  • cargo make test
  • 5-node mqdb 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).
  • 5-node --sharing: 8/8 clean on this branch, against 5/8 on main.
  • 5-node --presence: 3/3.
  • Each run's partition map settled in 5.5–7.8 s.
  • 5-node mqdb dev start-cluster (default topology) plus mqdb dev test --all, 2 runs: pubsub 20/20, db 10/10, wildcards, retained and lwt all pass.
  • The constraints suite's "Create first product" fails in both runs, as it also does on main and on the mqtt5 0.39 build. A create right after constraint add gets a retryable 503 unique reservation ... not yet durable for about 8 s, and the test waits 500 ms. That is a test-timing issue and is not addressed here.

@fabracht
fabracht merged commit f09fab1 into main Oct 3, 2026
9 checks passed
@fabracht
fabracht deleted the dev-full-mesh branch October 3, 2026 02:38
@fabracht fabracht mentioned this pull request Oct 3, 2026
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant