Repository navigation
fix(dedup): arm RequestGate at Unix bind when KEPLOY_DEDUP_ATTACH=via-proc - #203
Merged
Merged
Conversation
…-proc When a launcher runs dynamic dedup with a deferred via-proc collector, the data socket is bound only on the first control command, so RequestGate stayed unarmed during pre-test readiness probes and marked the first testcase armed-mid-flight. Arm immediately after binding the Unix control socket when KEPLOY_DEDUP_ATTACH=via-proc (or -Dkeploy.dedup.attach=via-proc) is declared, while keeping user traffic without that declaration unarmed and preserving fail-closed contamination when a pre-test request is still in flight at START. Signed-off-by: slayerjain <shubhamkjain@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Arms
RequestGateimmediately whenCommandServerbinds its Unix domain socket andKEPLOY_DEDUP_ATTACH=via-proc(or-Dkeploy.dedup.attach=via-proc) is declared.Problem
In Kubernetes Native Pod replay (via-proc collector), the collector connects lazily through
/proc/<pid>/rootafter the application passes readiness. Because the Unix socket is bound at JVM startup before any collector connects,RequestGatepreviously stayed unarmed until the firstSTARTcommand arrived. Any readiness probe executed beforeSTARTran through the unarmed path and latchedunarmedEntered, causing the first recorded test window to be markedarmed-mid-flight(NOT_MEASURED).Fix
When
KEPLOY_DEDUP_ATTACH=via-proc(case-insensitive, trimmed) is set,CommandServer.bind()armsRequestGateonce the Unix socket binds — matching the existing startup-armed semantics of pre-bound Unix and TCP modes while keeping allarmed-mid-flightfail-closed guarantees intact when the declaration is absent or when an in-flight request overlapsSTART(tail:prev).Verification
HonestProtocolAndAsyncTest, full Maven suite,smoke-javaagent.sh, and reproducible shaded jar check).