-
Notifications
You must be signed in to change notification settings - Fork 180
RUST-1274 Fix commitTransaction on check out retries #651
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
RUST-1274 Fix commitTransaction on check out retries #651
Conversation
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.
Re-requesting review, since I changed some logic to fix RUST-1317, which was required to implement the test for this.
topology.notify_topology_changed(); | ||
} | ||
self.check_server(&topology, &server).await; | ||
topology.notify_topology_changed(); |
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.
Once I added a commit to fix RUST-1317, some tests started failing due to this if
statement. The problem is if the error stayed the same, this check would not call notify_topology_changed
, which in turn would mean that the operation blocked on server selection would not try again and would not request another immediate check. This means that the blocked operation wouldn't succeed until the next heartbeat regularly scheduled, which could be 10s of seconds in the future.
Note that this new implementation matches the pseudocode in the server monitoring spec as well as the Python implementation. Also, by passing the test added in DRIVERS-1251, the C#, Go and Java likely have this behavior too. The spec does allow for our prior only-notify-if-changed behavior though, so I filed DRIVERS-2329 to require the behavior seen here.
RUST-1274
This backports the fix for
InvalidOptions
errors that are seen whencommitTransaction
commands are retried due to connection check out failures. The fix for this was included onmain
in #628.