-
Notifications
You must be signed in to change notification settings - Fork 210
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: change to snapshot isolation #2537
Conversation
BREAKING CHANGE: This changes commit semantics from serializable to snapshot isolation. This will allow Delete and Update queries to always succeed with concurrent Append transactions. This also bumps up the default internal retries to 20, which should reduce the incidence of transaction failures.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2537 +/- ##
==========================================
+ Coverage 79.76% 79.78% +0.02%
==========================================
Files 207 207
Lines 59586 59602 +16
Branches 59586 59602 +16
==========================================
+ Hits 47528 47556 +28
+ Misses 9264 9259 -5
+ Partials 2794 2787 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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 think this is fine but it would still be good to make the number of retries configurable. If an application is supporting adds from users and there are X concurrent users then it seems like there will eventually, at some point, need to be at least X retries. Although maybe users should be doing some kind of internal batching once they start to have more than 20 appends per second?
@@ -20,7 +20,7 @@ exclude = ["python"] | |||
resolver = "2" | |||
|
|||
[workspace.package] | |||
version = "0.13.1" | |||
version = "0.14.0" |
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.
Are you also bumping the lance version?
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.
Doing this to pass the breaking change policy check.
I agree, just don't have appetite to change the necessary APIs at the moment. Would require plumbing a new parameter through every single write operation. Left it as a TODO in #2538 |
@@ -494,6 +505,18 @@ pub(crate) async fn commit_transaction( | |||
}) | |||
} | |||
|
|||
fn backoff_time(attempt_i: u32) -> std::time::Duration { |
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.
unrelated nit: we could make a RetryIterator<Item = Duration>
BREAKING CHANGE: This changes commit semantics from serializable to snapshot isolation. This will allow Delete and Update queries to always succeed with concurrent Append transactions.
This also bumps up the default internal retries to 20, which should reduce the incidence of transaction failures.
Closes: #2143