Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
michaelklishin merged 2 commits into
v4.2.xfrom
mergify/bp/v4.2.x/pr-15996
Apr 10, 2026
Merged

Test flake chase: MQTT: fix a very timing-sensitive behavior around Last Will and Testament message delivery (backport #15995) (backport #15996)#15999
michaelklishin merged 2 commits into
v4.2.xfrom
mergify/bp/v4.2.x/pr-15996

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify Bot commented Apr 10, 2026

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).


This is an automatic backport of pull request #15995 done by Mergify.
This is an automatic backport of pull request #15996 done by Mergify.

(cherry picked from commit 8e90c42)
(cherry picked from commit 89d4fed)
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.

(cherry picked from commit 6f76113)
(cherry picked from commit 25bf953)
@michaelklishin michaelklishin added this to the 4.2.6 milestone Apr 10, 2026
@michaelklishin michaelklishin merged commit c49a280 into v4.2.x Apr 10, 2026
298 checks passed
@michaelklishin michaelklishin deleted the mergify/bp/v4.2.x/pr-15996 branch April 10, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant