Commit b68a949
docs(client): pin intentional go-dqlite divergences with source comments
Post-audit documentation pass. The cross-package audit flagged two
spots where we intentionally diverge from go-dqlite and where a
future reader might "helpfully" realign us to Go and regress the
behavior:
- find_leader shuffles within role class before sorting. Go's
connector iterates nodes in deterministic stored order, which would
stampede the same node across parallel callers. Add a block comment
warning future maintainers not to drop the shuffle without adding
stampede avoidance elsewhere.
- handshake generates a random client_id per connection. Go leaves the
default. We randomize for per-client server observability (logs,
traces, metrics). Add a comment noting the intentional divergence
and the 63-bit + "or 1" rationale.
Neither is a behavior change. Pure source-level annotation.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a521cf7 commit b68a949
2 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
114 | 120 | | |
115 | 121 | | |
116 | 122 | | |
| |||
0 commit comments