Repository navigation
v2.0.1 #27
emfoursolutions
announced in
Announcements
v2.0.1
#27
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Version 2.0.1 - Multi-Server RX Dispatch & Worker Stability
Release Date: July 23, 2026
Focus: Silent data-loss fix for multi-server streams and a long-standing worker-recycling bug that surfaced in 2.0.0
Two hotfixes for issues introduced or first observed in 2.0.0. The RX dispatch bug caused output plugins to silently miss traffic from every TAK server beyond the first when a stream was attached to multiple servers — the postgres archiver made this visible for the first time. The Hypercorn worker was silently recycling every ~1000 requests (roughly every 30 minutes on a healthy deployment), tearing down long-lived stream state and interrupting CoT delivery; this has been present since Hypercorn was introduced but only became observable in 2.0.0 because plugin whitelist gating and buffering output plugins now depend on continuous worker uptime.
No schema changes. No new configuration. Straight upgrade from 2.0.0.
BUG FIXES
RX plugin dispatch now respects the multi-server junction table
Silent data loss for output plugins on multi-server streams — critical
The 2.0.0 many-to-many
stream_tak_serversjunction table was correctly consulted on the TX side and during worker startup, but the RX-side plugin dispatch query inservices/cot_service_integration.pystill filtered streams by the legacy single-servertak_server_idcolumn. When a stream was attached to multiple TAK servers, every CoT event received from any server other than the one referenced by the legacy foreign key was silently discarded — the output plugin was never called.stream_tak_servers, mirroring the "multi-first, legacy-fallback" pattern already used elsewhere in the codebase. Backward compatible: single-server streams continue to work unchanged. No migration required.Hypercorn worker no longer recycles every ~1000 requests
Long-lived stream state and buffered plugin data preserved across worker lifetime
The Docker entrypoint launched Hypercorn with
--max-requests 1000, a stateless-web-worker recycling pattern that fights TrakBridge's single-long-lived-worker architecture. Every recycle:The recycling was silent in earlier releases because output plugins had no buffered state and no whitelist gating existed. In 2.0.0 the combination surfaced the bug as observable data loss (buffered rows in the postgres archiver) and unrecoverable startup failures (whitelist reload permission errors on some deployments).
--max-requestshas been removed from the Hypercorn command line. TheHYPERCORN_MAX_REQUESTSenvironment variable is no longer honoured; any override in existing compose files is silently ignored. Worker hygiene is now handled by graceful shutdown and container health checks alone.Full COT service shutdown on process teardown
Output plugin cleanup and pending output stats now flushed on SIGTERM
_cleanup_persistent_cot_service()inservices/stream_manager.pyonly stopped in-flight workers on shutdown; it never awaitedQueuedCOTService.shutdown(). That meant:cleanup()hooks on cached output plugins were never calledThe teardown path now drives the full async shutdown via
run_coroutine_threadsafeon the stream manager's event loop, matching the pattern already used forstop_all()and_cleanup_monitoring_services(). A worker-stop fallback remains for the edge case where no event loop is available, with a warning logged to make skipped plugin cleanup visible.PLUGIN SDK
No SDK version bump. The lifecycle hooks (
start(),cleanup()) documented in the 2.0.0 SDK are now correctly driven by core on every configured teardown path: stream reconfig, stream deletion, stream stop/restart, and clean process shutdown.UPGRADE NOTES
Straight upgrade from 2.0.0. No schema migration, no configuration change required.
Behavioural change: workers now stay up until the container is explicitly restarted. Health-check based hygiene continues as before. If you were relying on periodic worker recycling for any reason (memory cleanup, garbage collection, socket refresh), your Hypercorn worker will now behave like a genuinely long-lived process — plan container restart cadence accordingly.
The
HYPERCORN_MAX_REQUESTSenvironment variable is no longer read. Override entries in existingdocker-compose.ymlfiles can be removed at your convenience; leaving them in place is harmless.This discussion was created from the release v2.0.1.
All reactions