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

feat(ds): make durable sessions handle will messages #12742

Merged
merged 2 commits into from
Mar 25, 2024

Conversation

thalesmg
Copy link
Contributor

Fixes https://emqx.atlassian.net/browse/EMQX-10431

Release version: v/e5.7

Summary

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Added property-based tests for code which performs user input validation
  • Changed lines covered in coverage report
  • Change log has been added to changes/(ce|ee)/(feat|perf|fix|breaking)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • Created PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • If changed package build workflow, pass this action (manual trigger)
  • Change log has been added to changes/ dir for user-facing artifacts update

@thalesmg thalesmg force-pushed the ds-will-msg-m-20240318 branch 3 times, most recently from f7f847d to 9c227b0 Compare March 20, 2024 13:18
@thalesmg thalesmg force-pushed the ds-will-msg-m-20240318 branch 12 times, most recently from 4a7c513 to 6a05968 Compare March 21, 2024 14:52
@thalesmg thalesmg marked this pull request as ready for review March 21, 2024 16:49
@thalesmg thalesmg requested review from lafirest and a team as code owners March 21, 2024 16:49

-spec set_will_message(emqx_maybe:t(message()), t()) -> t().
set_will_message(Val, Rec) ->
set_meta(?will_message, Val, Rec).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Keeping the will message inside the ?meta table/domain will make things harder for the "session data in DS" feature, because of the lack of transactions there: we'd need to read the metadata and write it back, having the potential of races.

How about we have a table just for that, so that it maps to a topic (in the other PR) that can be safely overwritten without having to read it first?

ieQu1
ieQu1 previously approved these changes Mar 25, 2024
@thalesmg thalesmg merged commit 4af1a8c into emqx:master Mar 25, 2024
167 checks passed
@thalesmg thalesmg deleted the ds-will-msg-m-20240318 branch March 25, 2024 18:34
@emqxqa
Copy link

emqxqa commented May 8, 2024

Test Execution

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.

None yet

3 participants