Commit Graph
2048 Commits
Author SHA1 Message Date
Grant Limberg 2e6fe413b6 controller: prevent commit-pipeline freezes and message loss
The Jul 21-22 incident: a commit thread wedged inside the change-notification
fan-out while holding _changeListeners_l/_dbs_l, every other commit thread piled
up behind it, and the PubSub listeners kept acking member/network changes into a
queue nothing drained -- silently losing them (CV1 authorize never applied).

- Lock hygiene: snapshot-then-call in DB::_memberChanged/_networkChanged,
  DBMirrorSet fan-out, and ENC onNetworkUpdate/onNetworkMemberUpdate/
  onNetworkMemberDeauthorize; no listener callback runs under notification locks
- Liveness watchdog in heartbeat(): warn when a commit thread makes no progress
  for 60s, abort the process at 5min so the orchestrator restarts a zombie
- Ack gating: PubSub listeners nack (redeliver) instead of acking when the
  commit pipeline is stalled or the queue is over depth
- libpq connect_timeout/keepalives/tcp_user_timeout/statement_timeout on pooled
  connections so a dead DB peer throws instead of blocking a thread forever
- Name controller threads (wchan/stack dumps become readable); commit queue
  depth and enqueue-to-commit latency gauges
2026-07-22 16:06:09 +02:00
Grant Limberg c02c649cd3 more build updates.
removing openssl dependency (except on Linux where it's still necessary)
upgrade cpp-httplib
new cmake-presets
2026-06-15 18:51:24 -07:00
Grant Limberg 404fa9b2f9 fix incompatible options on crypto files in windows 2026-06-15 16:59:49 -07:00
Grant Limberg 052ea55636 bring CMake in line with make-linux/mac/bsd 2026-06-12 17:15:30 -07:00
Grant Limberg 29f5464dbd Merge branch 'dev' into gl/ctl-pubsub 2026-05-28 08:49:48 -07:00
dimitriy-dade f87d5477f6 Merging 1.16.2 from Private to Public 2026-05-22 11:39:10 -04:00
Grant Limberg 00dca6a2c0 Merge branch 'dev' into gl/ctl-pubsub 2025-11-06 10:01:11 -08:00
Chris Spiegel 45773f0b6e Ensure members in PacketMultiplexer are initialized
_enabled is set to true by setUpPostDecodeReceiveThreads(), so disabled
until then, but the constructor wasn't initializing it. _concurrency is
not being used before being set but for safety's sake, ensure it has a
starting value as well.

Also, remove the vestigial _rxThreadCount, which is no longer used.
2025-11-03 11:20:01 -08:00
Grant Limberg 195d5b47f0 Merge branch 'adam/1.16' into gl/ctl-pubsub 2025-09-01 16:47:55 -07:00
Grant Limberg 7f3b15011e Update central controller build to use CMake + conda
Muuuuch easier to use external dependencies now

Also tried out conan and vcpkg.   Ran into dependency issues when solving for packages to install with conan.

vcpkg is just obtuse as all hell to install and not easy to integrate
2025-08-27 16:23:02 -07:00
Adam Ierymenko bfa4bd2584 Removing this, which was suggested by a linter, turns out to break things by breaking equality comparison. The NetworkConfig struct would have to be re-implemented in a more modern way to allow the compiler to properly generate comparison operators, which is not important right now. 2025-08-25 13:38:57 -07:00
Adam Ierymenko 1e62d69762 Do not compress frames -- also unrelated to bug. 2025-08-25 11:47:50 -07:00
Adam Ierymenko bed6557a6d Re-enable relaying checks, also not bug related but put back after we decided to punt removing moons. 2025-08-25 11:22:21 -07:00
Adam Ierymenko bee3ea79f0 Minor thing, unrelated to bug but missing. 2025-08-21 18:47:41 -04:00
Adam Ierymenko 6e6fc9a704 Add conditional compilation of controller. 2025-08-21 09:55:08 -04:00
Adam Ierymenko ab208bb8f9 Make encrypted HELLO a local.conf setting -- 99.999999% of users do not need it and it introduces scalability problems on large controllers. 2025-08-12 12:34:54 -04:00
Adam Ierymenko 9aff094b6f node/ -> MPL 2025-08-06 12:10:18 -04:00
Adam Ierymenko f319078694 Merge github/dev 2025-08-05 11:03:59 -04:00
Adam Ierymenko 6e34b192e3 cleanup 2025-08-04 11:09:06 -04:00
Adam Ierymenko d51b82d0e6 Temporarily disable checks to always forward -- for testing. 2025-07-18 14:26:19 -04:00
Adam Ierymenko 92838fa1b2 Controller support for "relays" field. 2025-07-17 17:04:07 -04:00
Adam Ierymenko 055be92ef0 Plumb through attaching network ID to packet sends. 2025-07-16 11:55:00 -04:00
Adam Ierymenko 58c80ff0ab Add network ID to upstream lookup, cleanup, release notes for 1.16. 2025-07-15 13:54:10 -04:00
Adam Ierymenko 697011df7b Cleanup, define specialist for network specific relays, remove some dead code. 2025-07-11 10:48:12 -04:00
Joseph Henry 7473d1942d Merge changes from dev 2025-07-09 18:01:11 -07:00