Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mqtt-streaming: fix flaky 'duplicate publish given two client connections' test #456

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

raboof
Copy link
Member

@raboof raboof commented Feb 8, 2024

It appears the flakiness was caused by the two connections using the same connection id for different connections in the same session. I'm not intimately familiar with this codebase, but AFAICS it seems this connection id is an internal concern to the component, and not an MQTT concept. I think we should probably provide an API that does not bother the user with this concept at all, and manages non-overlapping connection ids entirely internal to the component - filed #457. I don't get the impression that it was the purpose of the test to test the behaviour in case of overlapping connection ids.

Fixes #454

This PR still fails due to #458 but #460 suggests it should be OK when combined with #459.

(note the diff is much simpler than it looks, use the 'Hide whitespace' under the cog in the diff view to ignore the indent change)

…ions' test

It appears the flakiness was caused by the two connections using the same
connection id for different connections in the same session. I'm not intimately
familiar with this codebase, but AFAICS it seems this connection id is an
internal concern to the component, and not an MQTT concept. I think we should
probably provide an API that does not bother the user with this concept at
all, and manages non-overlapping connection ids entirely internal to the
component. I don't get the impression that it was the purpose of the test to
test the behaviour in case of overlapping connection ids.

Fixes apache#454

After this change the 'unsubscribe a client session' seems to fail
a lot on CI, but that seems unrelated and something to fix in a separate PR.
@raboof raboof force-pushed the mqtt-streaming-fix-flaky-test branch 2 times, most recently from def3f73 to c8611a5 Compare February 8, 2024 12:51
@raboof raboof force-pushed the mqtt-streaming-fix-flaky-test branch from e9bd5f3 to c8611a5 Compare February 8, 2024 14:42
Copy link
Contributor

@mdedetrich mdedetrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. I think that we should also backport this to 1.0.x since we will still be supporting these connectors @pjfanning wdyt?

Copy link
Contributor

@pjfanning pjfanning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@raboof raboof merged commit 48e7b34 into apache:main Feb 9, 2024
147 of 150 checks passed
raboof added a commit to raboof/incubator-pekko-connectors that referenced this pull request Jul 7, 2024
While looking into apache#468, I noticed the two failing tests were
sharing the same session id, which reminded of apache#456.

While in this case the two tests aren't sharing the same
session, and I haven't investigated the details of this
codebase further, I'm curious to see if the problem remains
when we use unique session ids.
raboof added a commit to raboof/incubator-pekko-connectors that referenced this pull request Jul 7, 2024
While looking into apache#468, I noticed the two failing tests were
sharing the same session id, which reminded of apache#456.

While in this case the two tests aren't sharing the same
session, and I haven't investigated the details of this
codebase further, I'm curious to see if the problem remains
when we use unique session ids.
raboof added a commit that referenced this pull request Jul 7, 2024
While looking into #468, I noticed the two failing tests were
sharing the same session id, which reminded of #456.

While in this case the two tests aren't sharing the same
session, and I haven't investigated the details of this
codebase further, I'm curious to see if the problem remains
when we use unique session ids.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants