-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Single round trip commit on BatchExecute #4739
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.
An alternate approach I was thinking is to add a new txIsolations
entry called AUTOCOMMIT, and it will just not issue a begin
(and skip commit
).
And then you can use a LocalBegin-LocalCommit
in that mode, which will end up doing exactly what you want.
Advantage is that it's a minor code change and less duplication. But I'm not sure if it will be construed as too much magic.
12dc9a8
to
f0a3ae9
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.
TabletServer has a SetPassthroughDML
call. Were you not able to just switch it for this endtoend test?
8b9ad97
to
160c90b
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.
changes look good except for a couple small typos we should clean up and some kind of better testing.
160c90b
to
c36726e
Compare
* When auto-commit is on, passDML is on and ExecuteBatch is in a transaction, there is no need to explicitly create a transaction. We can forward the DML directly to the database. * This optimization yielded significant more throughput in vttablets. We got around 25-30% improvement. Most of our queries are single point inserts/updates that already use auto commit when coming from vtgates, so this improvement is something that we've been wanting to do for a long time. Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
c36726e
to
20b59bb
Compare
* Solce throttler starvation issue, vitess-private 18 and 17 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adapt tests Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Description
there is no need to explicitly create a transaction. We can forward the DML
directly to the database.
around 25-30% improvement. Most of our queries are single point
inserts/updates that already use auto commit when coming from vtgates, so this
improvement is something that we've been wanting to do for a long time.
Benchmark
Setup
Results
TL;DR
Prior to this change BLACKHOLE ENGINE:
The following parameters where passed to vtbench:
Prior to this change REAL ENGINE:
The following parameters where passed to vtbench:
New Build BLACKHOLE ENGINE:
The following parameters where passed to vtbench:
New Build REAL ENGINE:
The following parameters where passed to vtbench: