Skip to content
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

Merged

Conversation

VPolka
Copy link
Collaborator

@VPolka VPolka commented Jul 11, 2024

Changelog entry

Changelog category

  • Bugfix

Additional information

...

@VPolka VPolka linked an issue Jul 11, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Jul 11, 2024

2024-07-11 13:01:48 UTC Pre-commit check for 82750b6 has started.
2024-07-11 13:04:15 UTC Build linux-x86_64-release-asan is running...
🟢 2024-07-11 13:33:01 UTC Build successful.
2024-07-11 13:33:18 UTC Tests are running...
🔴 2024-07-11 14:11:15 UTC Test run completed, no test results found for commit 430eeee. Please check test log.
🔴 2024-07-11 14:11:55 UTC ydbd size 5.2 GiB changed* by +3.0 MiB, which is >= 2.0 MiB vs main: Alert

ydbd size dash main: b0dd23a merge: 82750b6 diff diff %
ydbd size 5 604 786 680 Bytes 5 607 930 248 Bytes +3.0 MiB +0.056%
ydbd stripped size 1 206 070 064 Bytes 1 207 237 424 Bytes +1.1 MiB +0.097%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation
2024-07-11 14:11:56 UTC Check cancelled

Copy link

github-actions bot commented Jul 11, 2024

2024-07-11 13:02:50 UTC Pre-commit check for 82750b6 has started.
2024-07-11 13:05:22 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-07-11 13:48:36 UTC Build successful.
2024-07-11 13:49:01 UTC Tests are running...
🔴 2024-07-11 14:11:11 UTC Test run completed, no test results found for commit 430eeee. Please check test log.
🔴 2024-07-11 14:11:46 UTC ydbd size 8.1 GiB changed* by +2.9 MiB, which is >= 2.0 MiB vs main: Alert

ydbd size dash main: b0dd23a merge: 82750b6 diff diff %
ydbd size 8 713 965 512 Bytes 8 717 048 584 Bytes +2.9 MiB +0.035%
ydbd stripped size 475 274 512 Bytes 475 511 312 Bytes +231.2 KiB +0.050%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation
2024-07-11 14:11:48 UTC Check cancelled

Copy link

github-actions bot commented Jul 11, 2024

2024-07-11 13:03:26 UTC Pre-commit check for 82750b6 has started.
2024-07-11 13:06:00 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-07-11 13:25:52 UTC Build successful.

@VPolka VPolka force-pushed the fix-isolation-level-for-per-statement-mode branch from 430eeee to 9a455ba Compare July 11, 2024 14:10
Copy link

github-actions bot commented Jul 11, 2024

2024-07-11 14:14:24 UTC Pre-commit check for b7da6a5 has started.
2024-07-11 14:17:42 UTC Build linux-x86_64-release-asan is running...
🟢 2024-07-11 14:41:43 UTC Build successful.
2024-07-11 14:41:56 UTC Tests are running...
🔴 2024-07-11 15:27:15 UTC Test run completed, no test results found for commit 9a455ba. Please check test log.
🟡 2024-07-11 15:27:46 UTC ydbd size 5.2 GiB changed* by +353.7 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 50074e8 merge: b7da6a5 diff diff %
ydbd size 5 607 929 464 Bytes 5 608 291 672 Bytes +353.7 KiB +0.006%
ydbd stripped size 1 207 237 168 Bytes 1 207 301 968 Bytes +63.3 KiB +0.005%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation
2024-07-11 15:27:47 UTC Check cancelled

Copy link

github-actions bot commented Jul 11, 2024

2024-07-11 14:21:29 UTC Pre-commit check for b7da6a5 has started.
2024-07-11 14:24:28 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-07-11 14:30:38 UTC Build successful.

Copy link

github-actions bot commented Jul 11, 2024

2024-07-11 14:47:55 UTC Pre-commit check for b7da6a5 has started.
2024-07-11 14:50:21 UTC Build linux-x86_64-relwithdebinfo is running...
2024-07-11 15:27:21 UTC Check cancelled

@VPolka VPolka force-pushed the fix-isolation-level-for-per-statement-mode branch 3 times, most recently from 9b8f79f to 0093405 Compare July 11, 2024 15:33
Copy link

github-actions bot commented Jul 11, 2024

2024-07-11 15:38:30 UTC Pre-commit check for aa9e0aa has started.
2024-07-11 15:40:59 UTC Build linux-x86_64-release-asan is running...
🟢 2024-07-11 16:03:32 UTC Build successful.
2024-07-11 16:03:42 UTC Tests are running...
🔴 2024-07-11 18:05:01 UTC Some tests failed, follow the links below.

Test history | Test log

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
9791 9205 0 83 323 180

🟡 2024-07-11 18:05:51 UTC ydbd size 5.2 GiB changed* by +424.4 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 21bdc0e merge: aa9e0aa diff diff %
ydbd size 5 607 929 432 Bytes 5 608 364 048 Bytes +424.4 KiB +0.008%
ydbd stripped size 1 207 237 168 Bytes 1 207 409 584 Bytes +168.4 KiB +0.014%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Jul 11, 2024

2024-07-11 15:42:45 UTC Pre-commit check for aa9e0aa has started.
2024-07-11 15:45:18 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-07-11 15:51:03 UTC Build successful.

Copy link

github-actions bot commented Jul 11, 2024

2024-07-11 15:51:42 UTC Pre-commit check for aa9e0aa has started.
2024-07-11 15:54:16 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-07-11 16:32:00 UTC Build successful.
2024-07-11 16:32:14 UTC Tests are running...
🔴 2024-07-11 17:49:57 UTC Some tests failed, follow the links below.

Test history | Test log

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14066 12743 0 1 1306 16

🟡 2024-07-11 17:50:22 UTC ydbd size 8.1 GiB changed* by +773.8 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 21bdc0e merge: aa9e0aa diff diff %
ydbd size 8 717 047 464 Bytes 8 717 839 816 Bytes +773.8 KiB +0.009%
ydbd stripped size 475 511 184 Bytes 475 642 768 Bytes +128.5 KiB +0.028%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@VPolka VPolka force-pushed the fix-isolation-level-for-per-statement-mode branch from 0093405 to 506f4a2 Compare July 12, 2024 12:49
@VPolka VPolka force-pushed the fix-isolation-level-for-per-statement-mode branch from 506f4a2 to 8855e21 Compare July 12, 2024 12:50
Copy link

github-actions bot commented Jul 12, 2024

2024-07-12 13:10:51 UTC Pre-commit check for 40d09e7 has started.
2024-07-12 13:13:36 UTC Build+Tests linux-x86_64-relwithdebinfo is running...
🟢 2024-07-12 14:46:02 UTC Build successful.
🔴 2024-07-12 14:51:03 UTC Some tests failed, follow the links below.

Test history | Test log

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
13846 12516 0 1 1310 19

🟢 2024-07-12 14:51:51 UTC ydbd size 8.1 GiB changed* by -5.1 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: d0aff76 merge: 40d09e7 diff diff %
ydbd size 8 718 800 608 Bytes 8 718 795 376 Bytes -5.1 KiB -0.000%
ydbd stripped size 475 668 912 Bytes 475 668 336 Bytes -576 Bytes -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Jul 12, 2024

2024-07-12 13:11:35 UTC Pre-commit check for 40d09e7 has started.
2024-07-12 13:14:15 UTC Build+Tests linux-x86_64-release-asan is running...
🟢 2024-07-12 15:20:58 UTC Build successful.
🔴 2024-07-12 15:23:54 UTC Some tests failed, follow the links below.

Test history | Test log

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
9577 8985 0 86 324 182

🟢 2024-07-12 15:24:39 UTC ydbd size 5.2 GiB changed* by -11.3 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: d0aff76 merge: 40d09e7 diff diff %
ydbd size 5 608 995 032 Bytes 5 608 983 496 Bytes -11.3 KiB -0.000%
ydbd stripped size 1 207 400 496 Bytes 1 207 397 360 Bytes -3.1 KiB -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Jul 12, 2024

2024-07-12 13:11:39 UTC Pre-commit check for 40d09e7 has started.
2024-07-12 13:14:52 UTC Build+Tests linux-x86_64-release-clang14 is running...
🟢 2024-07-12 13:26:07 UTC Build successful.

Copy link
Collaborator

@UgnineSirdis UgnineSirdis Jul 21, 2024

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
    }
    ...
}

Copy link

github-actions bot commented Jul 29, 2024

2024-07-29 13:30:11 UTC Pre-commit check for a74a27d has started.
2024-07-29 13:33:17 UTC Check linux-x86_64-release-asan is running...
🔴 2024-07-29 15:37:31 UTC Some tests failed, follow the links below.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
9685 9102 0 84 324 175

🟢 2024-07-29 15:38:28 UTC Build successful.
🟢 2024-07-29 15:39:25 UTC ydbd size 5.2 GiB changed* by +624 Bytes, which is < 100.0 KiB vs main: OK

ydbd size dash main: 3ab5a95 merge: a74a27d diff diff %
ydbd size 5 569 924 192 Bytes 5 569 924 816 Bytes +624 Bytes +0.000%
ydbd stripped size 1 199 042 192 Bytes 1 199 042 256 Bytes +64 Bytes +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Jul 29, 2024

2024-07-29 13:30:32 UTC Pre-commit check for a74a27d has started.
2024-07-29 13:33:31 UTC Check linux-x86_64-release-clang14 is running...
🟢 2024-07-29 13:40:21 UTC Build successful.

Copy link

github-actions bot commented Jul 29, 2024

2024-07-29 13:43:21 UTC Pre-commit check for a74a27d has started.
2024-07-29 13:46:32 UTC Check linux-x86_64-relwithdebinfo is running...
🟡 2024-07-29 15:12:53 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
13974 12636 0 1 1326 11

2024-07-29 15:14:18 UTC Failed tests rerun (try 2) linux-x86_64-relwithdebinfo is running...
🟢 2024-07-29 15:21:57 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
11 (only retried tests) 3 0 0 0 8

🟢 2024-07-29 15:23:09 UTC Build successful.
🟢 2024-07-29 15:23:47 UTC ydbd size 8.1 GiB changed* by -600 Bytes, which is <= 0 Bytes vs main: OK

ydbd size dash main: 3ab5a95 merge: a74a27d diff diff %
ydbd size 8 676 398 408 Bytes 8 676 397 808 Bytes -600 Bytes -0.000%
ydbd stripped size 471 817 376 Bytes 471 817 248 Bytes -128 Bytes -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@VPolka VPolka merged commit eab45d1 into ydb-platform:main Jul 29, 2024
10 of 12 checks passed
MrLolthe1st pushed a commit to MrLolthe1st/ydb that referenced this pull request Aug 12, 2024
ssmike pushed a commit to ssmike/ydb that referenced this pull request Sep 24, 2024
ssmike pushed a commit to ssmike/ydb that referenced this pull request Sep 24, 2024
ssmike added a commit that referenced this pull request Sep 24, 2024
Co-authored-by: VPolka <39378135+VPolka@users.noreply.github.com>
ssmike added a commit that referenced this pull request Sep 24, 2024
Co-authored-by: VPolka <39378135+VPolka@users.noreply.github.com>
uzhastik pushed a commit to uzhastik/ydb that referenced this pull request Oct 2, 2024
Co-authored-by: VPolka <39378135+VPolka@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix wrong isolation level for commit in per statement execution
2 participants