Skip to content

Test flake chase: MQTT: fix a very timing-sensitive behavior around Last Will and Testament message delivery#15995

Merged
michaelklishin merged 2 commits intomainfrom
mk-test-flakes-main-apr-9-2026-round-4
Apr 10, 2026
Merged

Test flake chase: MQTT: fix a very timing-sensitive behavior around Last Will and Testament message delivery#15995
michaelklishin merged 2 commits intomainfrom
mk-test-flakes-main-apr-9-2026-round-4

Conversation

@michaelklishin
Copy link
Copy Markdown
Collaborator

One change is just a bump of an unreasonably short timeout.

Another is a legitimate but very hard to reproduce bug in the MQTT plugin: avoid
a race condition between session expiry and the message expiry timer.

It takes quite a few runs to reproduce unless you pin the runtime to only use one scheduler.

The behavior change is reasonable given how specific the scenario is (two TTLs are at play, and the margin is fixed at 1s).

When Will-Delay-Interval >= Session-Expiry-Interval, the will queue's
x-expires and the will message TTL were only ~5 ms apart. Under a
loaded scheduler the queue could be deleted before the dead-letter
path ran, silently dropping the will.

Extend x-expires by a fixed 1 s margin. Strictly additive; the
SessionExpiry = infinity case is unchanged.
@michaelklishin michaelklishin merged commit 78234f0 into main Apr 10, 2026
376 checks passed
@michaelklishin michaelklishin deleted the mk-test-flakes-main-apr-9-2026-round-4 branch April 10, 2026 03:03
michaelklishin added a commit that referenced this pull request Apr 10, 2026
Test flake chase: MQTT: fix a very timing-sensitive behavior around Last Will and Testament message delivery (backport #15995)
michaelklishin added a commit that referenced this pull request Apr 10, 2026
Test flake chase: MQTT: fix a very timing-sensitive behavior around Last Will and Testament message delivery (backport #15995) (backport #15996)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant