hubcio opened a new pull request, #4036: URL: https://github.com/apache/iggy/pull/4036
The TCP dispatch funnel hid its rules in control flow: seven ordered if-return probes where the order was the only spec, two rewrite chains written out inline in two places, twenty send sites each picking a failure channel by whichever builder they called, two client-request handlers on shard 0 with separate queues, and a read gate that let unknown codes fall through to a catch-all. Each is now written down once. classify() returns a RequestClass that handle_client_request matches on, so the order of checks inside classify is the routing. rewrite.rs holds both rewrite chains as pure functions. dispatch/failure.rs holds the failure channel table and the one exit every host-built frame takes. Each shard builds one client-request handler that shard 0's transports share, dropping the duplicate queues, the double hook install and a reference cycle that leaked the shard. The read gate now decides every code in the command table instead of passing unlisted ones to the builder's empty-ok. Tests pin the probe order, each channel's bytes, and every table entry. Removing the cycle exposed a shutdown bug it had hidden: shard 0 owns the only write handle to the metadata state machine and could drop it while peers were still reading, panicking their pumps. Peers now count themselves out once their runtime is gone, and shard 0 waits for that, bounded by shutdown_join_timeout. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
