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 resolved timestamp emitted too early for some displaced upserts #8847

Merged

Conversation

snaury
Copy link
Member

@snaury snaury commented Sep 6, 2024

Changelog entry

Fix resolved timestamp emitted too early for some displaced upserts

Changelog category

  • Bugfix

Additional information

When an upsert is displaced (when current timestamp is blocked by a repeatable read) and shares timestamp with the next scheduled heartbeat, it was possible for that heartbeat to emit while we may still add more writes with that timestamp. The issue is fixed by using the correct comparison.

Found this bug while investigating #6985.

@snaury snaury self-assigned this Sep 6, 2024
@github-actions github-actions bot added the bugfix label Sep 6, 2024
@snaury snaury force-pushed the fix-resolved-timestamp-displaced-race branch from 6fa14ca to 743b639 Compare September 6, 2024 10:02
Copy link

github-actions bot commented Sep 6, 2024

2024-09-06 10:05:26 UTC Pre-commit check linux-x86_64-release-clang14 for 53688b4 has started.
2024-09-06 10:08:12 UTC ya make is running...
🟢 2024-09-06 10:14:05 UTC Build successful.

@snaury snaury marked this pull request as ready for review September 6, 2024 10:06
Copy link

github-actions bot commented Sep 6, 2024

2024-09-06 10:07:00 UTC Pre-commit check linux-x86_64-release-asan for 53688b4 has started.
2024-09-06 10:09:49 UTC ya make is running...
🔴 2024-09-06 11:42:28 UTC Some tests failed, follow the links below.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
10096 10019 0 27 24 26

🟢 2024-09-06 11:43:22 UTC Build successful.
🟢 2024-09-06 11:43:55 UTC ydbd size 5.6 GiB changed* by -3.3 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 0b897b9 merge: 53688b4 diff diff %
ydbd size 6 028 914 536 Bytes 6 028 911 112 Bytes -3.3 KiB -0.000%
ydbd stripped size 1 509 645 488 Bytes 1 509 644 592 Bytes -896 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 Sep 6, 2024

2024-09-06 10:07:06 UTC Pre-commit check linux-x86_64-relwithdebinfo for 53688b4 has started.
2024-09-06 10:10:06 UTC ya make is running...
🟡 2024-09-06 11:15:27 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14709 13302 0 6 1378 23

2024-09-06 11:16:42 UTC ya make is running... (failed tests rerun, try 2)
🟢 2024-09-06 11:26:40 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
49 (only retried tests) 31 0 0 0 18

🟢 2024-09-06 11:26:47 UTC Build successful.
🟢 2024-09-06 11:27:22 UTC ydbd size 8.4 GiB changed* by -2.3 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 0b897b9 merge: 53688b4 diff diff %
ydbd size 9 013 279 192 Bytes 9 013 276 800 Bytes -2.3 KiB -0.000%
ydbd stripped size 487 289 416 Bytes 487 289 224 Bytes -192 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

@github-actions github-actions bot added bugfix and removed bugfix labels Sep 6, 2024
@snaury snaury requested a review from CyberROFL September 6, 2024 11:18
@snaury snaury enabled auto-merge (squash) September 6, 2024 13:09
@snaury snaury merged commit b12c122 into ydb-platform:main Sep 6, 2024
11 of 13 checks passed
@snaury snaury deleted the fix-resolved-timestamp-displaced-race branch September 6, 2024 13:10
@shnikd shnikd mentioned this pull request Sep 11, 2024
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.

2 participants