-
Notifications
You must be signed in to change notification settings - Fork 606
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
fix wrong isolation level #6568
fix wrong isolation level #6568
Conversation
⚪
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
430eeee
to
9a455ba
Compare
⚪
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
9b8f79f
to
0093405
Compare
⚪
🟡
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪
🟡
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
0093405
to
506f4a2
Compare
506f4a2
to
8855e21
Compare
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
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'm not sure that this will fix the problem. I've debugged this test and found out, that the error occurs when we are executing the last PhyTx: ExecutePhyTx(tx==nullptr, commit=true)
. In this case we don't enter the first if (tx) {}
block and so don't execute QueryState->PrepareStatementTransaction(tx->GetType());
. So IsolationLevel is leaved as it was during previous PhyTx. I tried to add PrepareStatementTransaction also to the call with commit=true variant and it fixed the problem.
I think that the following code would be more safe:
bool ExecutePhyTx(const TKqpPhyTxHolder::TConstPtr& tx, bool commit) {
if (tx) {
QueryState->PrepareStatementTransaction(tx->GetType());
switch (tx->GetType()) {
...
}
} else {
YQL_ENSURE(commit);
QueryState->PrepareStatementTransaction(NKqpProto::TKqpPhyTx::TYPE_GENERIC); // not sure that this is the most suitable type, but in this call the main thing is that it is not equal to TYPE_SCHEME
}
...
}
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ ⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Co-authored-by: VPolka <39378135+VPolka@users.noreply.github.com>
Changelog entry
Changelog category
Additional information
...