-
Notifications
You must be signed in to change notification settings - Fork 21
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
khepri_machine: Request delete_reason
if effective machine version >= 2 only
#309
khepri_machine: Request delete_reason
if effective machine version >= 2 only
#309
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #309 +/- ##
==========================================
+ Coverage 89.58% 89.83% +0.25%
==========================================
Files 22 22
Lines 3263 3277 +14
==========================================
+ Hits 2923 2944 +21
+ Misses 340 333 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@the-mikedavis: As briefly stated in the commit message and a comment in the code, getting the effective machine version when handling transactions is a bit tricky. The code runs inside the Ra server process. It doesn’t have the store ID because we don’t keep it in the machine state, even though we get it in the init arguments… For now, I just query the registered name of the process, but, yeah, not ideal… Ideally, I would modify the state to add the store ID. We already bump the machine version anyway. I was lazy for this first iteration :-) So, I will prepare a new patch to modify that state, and I also need to document that the Regardless, what do you think of the patch so far? |
I’m wrong: we have the store ID in the machine configuration! |
8f5b966
to
6dc1be2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a few typos but otherwise I think this looks great!
…>= 2 only [Why] The `delete_reason` property to return was introduced with machine version 2. Older versions have two issues: * They don't know this property * They crash on unknown properties [How] We request this new property only if the effective machine version is greater or equal to 2 to avoid the issues listed above. Future unknown properties are ignored since commit 257cf32 merged in the previous pull request #308.
6dc1be2
to
e3d959c
Compare
@the-mikedavis: Did you check if mixed-version testing in RabbitMQ was fixed with this change? |
I didn't test this patch in the server but I was testing ba1bf14 before which should have roughly the same effect. We still need to handle the case of "paused" cluster members on the older version but that change did remove errors from |
I updated the draft PR in the server repo to use this change (and #312) and I don't see any error logs about delete_reason in the failed test logs 👍 |
Thank you! I couldn’t reproduce any errors related to this locally either. |
Why
The
delete_reason
property to return was introduced with machine version 2. Older versions have two issues:How
We request this new property only if the effective machine version is greater or equal to 2 to avoid the issues listed above.
Future unknown properties are ignored since commit 257cf32 merged in the previous pull request #308.