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

Volatile transaction support in EvWrite #2196

Merged
merged 7 commits into from
Feb 26, 2024

Conversation

azevaykin
Copy link
Collaborator

Changelog entry

Volatile transaction support in EvWrite

Changelog category

  • Experimental feature

Additional information

...

Copy link

github-actions bot commented Feb 22, 2024

2024-02-22 15:14:16 UTC Pre-commit check for 7662bd7 has started.
2024-02-22 15:14:18 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-02-22 15:20:06 UTC Build successful.
2024-02-22 15:20:16 UTC Tests are running...
🔴 2024-02-22 16:35:57 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
67842 56847 0 2 10954 39

Copy link

github-actions bot commented Feb 22, 2024

2024-02-22 15:16:16 UTC Pre-commit check for 7662bd7 has started.
2024-02-22 15:16:18 UTC Build linux-x86_64-release-asan is running...
🟢 2024-02-22 15:21:53 UTC Build successful.
2024-02-22 15:22:09 UTC Tests are running...
🔴 2024-02-22 16:57:56 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14837 14616 0 18 164 39

ydb/core/tx/datashard/datashard.cpp Outdated Show resolved Hide resolved
TValidatedWriteTx::TValidatedWriteTx(TDataShard* self, TTransactionContext& txc, ui64 globalTxId, TInstant receivedAt, const TRowVersion& readVersion, const TRowVersion& writeVersion, const NEvents::TDataEvents::TEvWrite& ev)
: UserDb(*self, txc.DB, globalTxId, readVersion, writeVersion, EngineHostCounters, TAppData::TimeProvider->Now())
TValidatedWriteTx::TValidatedWriteTx(TDataShard* self, TTransactionContext& txc, ui64 globalTxId, TInstant receivedAt, const NEvents::TDataEvents::TEvWrite& ev)
: UserDb(*self, txc.DB, globalTxId, TRowVersion::Min(), TRowVersion::Max(), EngineHostCounters, TAppData::TimeProvider->Now())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А почему readVersion=Min, writeVersion=Max? Это даже никакого смысла не имеет, если с такими настройками произойдёт запись в базу, то потом все инварианты поедут. Кроме того в случае mvcc различающиеся версии read и write это не нормально.

Copy link
Collaborator Author

@azevaykin azevaykin Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сошлись на том, что UserDb нужно хранить во WriteOperation.
И read/write version нужно брать свежие, прямо перед записью.
И нужно осторожнее с WriteVersion, чтобы он не пришёл со значением Max в локальную базу.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Только не во WriteOperation, а на стеке в том юните, который собирается работать с базой.

Copy link

github-actions bot commented Feb 26, 2024

2024-02-26 13:46:36 UTC Pre-commit check for 883ab54 has started.
2024-02-26 13:46:39 UTC Build linux-x86_64-release-cmake14 is running...
🟢 2024-02-26 14:26:36 UTC Build successful.

Copy link

github-actions bot commented Feb 26, 2024

2024-02-26 13:46:41 UTC Pre-commit check for 883ab54 has started.
2024-02-26 13:46:43 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-02-26 14:10:03 UTC Build successful.
2024-02-26 14:10:16 UTC Tests are running...
🔴 2024-02-26 15:44:35 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
67954 57043 0 3 10883 25

Copy link

github-actions bot commented Feb 26, 2024

2024-02-26 13:46:50 UTC Pre-commit check for 883ab54 has started.
2024-02-26 13:46:54 UTC Build linux-x86_64-release-asan is running...
🟢 2024-02-26 14:09:33 UTC Build successful.
2024-02-26 14:09:49 UTC Tests are running...
🔴 2024-02-26 15:54:38 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14857 14704 0 29 100 24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants