Repository navigation
Conversation
three_nodes_ack_sync_ordered_delivery traces 'receive' on the scope's
sender process, reconnects a node, waits until the node shows up in the
scope's subcluster, turns tracing off and only then looks for the traced
ack_sync. The scope queues ack_sync to the sender and adds the node to
nodes_map in the same handle_info call, so the node can be visible
before the sender has taken the message from its queue. A message that
is still queued when tracing is turned off produces no receive event,
and the check fails with {badmatch,false}.
Turning tracing off after the check keeps the sender traced until it
receives ack_sync. The check's 2 second timeout still bounds the wait.
Suspending the sender from before the reconnect until just before the
check makes the test fail in 10 runs out of 10 when tracing is turned
off first, and pass in 10 out of 10 with this change. Run alone 60
times on OTP 27, the case failed 5 times before the change and never
after it.
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.
three_nodes_ack_sync_ordered_deliveryturns on'receive'tracing of the scope's sender process, reconnects the slave node, waits until the node shows up in the scope's subcluster, turns tracing off, and only then looks for the traced{send_single, _, {'3.0', ack_sync, _, _}, _}message incheck_trace_for_ack_sync_via_sender/0, which gives up after 2 seconds. Thediscoverhandler ofsyn_gen_scopequeues theack_syncto the sender and adds the node tonodes_mapin the samehandle_infocall, so the node can be visible in the subcluster before the sender has taken the message out of its queue. A message that is still queued when tracing is turned off produces noreceivetrace event, and the check fails with{badmatch, false}.The change moves
erlang:trace(SenderPid, false, ['receive'])after the check. The sender stays traced until it has received theack_sync, and the 2 second timeout of the check still bounds the wait. Nothing else changes.Evidence, OTP 27.3.4.11. With the sender suspended from right after tracing starts until just before the check (
erlang:suspend_process/1andresume_process/1, a scratch edit not in this branch), the case fails 10 runs out of 10 with tracing turned off first and passes 10 out of 10 with the change. Run alone, one freshct_runper run, 60 times: 5 failures with{badmatch, false}before the change, 0 after it. The fullsyn_registry_SUITEpasses with the change on OTP 25.3.2.8, 27.3.4.11 and 29.0.6.