Skip to content

Conversation

@ijon
Copy link
Collaborator

@ijon ijon commented Jan 30, 2024

Changelog entry

Fix excessive memory requirements for backing up databases with massive amount of tables.

Changelog category

  • Bugfix

Additional information

Simplified tracking of in-memory schema state in schemeshard captured too many copies of database metadata objects during database export/backup.

KIKIMR-20242

Export launches copy-tables operation, copy-tables invokes multiple
copy table suboperations, each copy-table suboperation grabs and
saves aside metadata of table's subdomain (to be able to restore
original subdomain state in case IgniteOperation() fails).

Straightforward implementation of TMemChanges resulted in that
the same and only subdomain being copied multiple times.

Which for massive export actions with many-many tables copied
is both cpu intensive and, more importantly, requires excessive
amount of memory (up to several observed OOM events).

This fix changes TMemChanges to store only one subdomain state
version per operation. Which is correct and appropriate for
copy-tables and all other (sub)operations.

KIKIMR-20242
@github-actions
Copy link

github-actions bot commented Jan 30, 2024

2024-01-30 23:08:02 UTC Pre-commit check for f3967cc has started.
2024-01-30 23:08:05 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-01-30 23:12:50 UTC Build successful.
2024-01-30 23:13:03 UTC Tests are running...
🔴 2024-01-31 00:24:37 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
60214 50903 0 2 9263 46

@github-actions
Copy link

github-actions bot commented Jan 30, 2024

2024-01-30 23:10:19 UTC Pre-commit check for f3967cc has started.
2024-01-30 23:10:21 UTC Build linux-x86_64-release-asan is running...
🟢 2024-01-30 23:15:06 UTC Build successful.
2024-01-30 23:15:22 UTC Tests are running...
🔴 2024-01-31 00:51:06 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
16018 15913 0 19 50 36

@ijon ijon requested a review from snaury January 31, 2024 07:17
@ijon ijon merged commit 8c77bc1 into ydb-platform:main Jan 31, 2024
This was referenced Jan 31, 2024
@pavelvelikhov pavelvelikhov mentioned this pull request Feb 3, 2024
@niksaveliev niksaveliev mentioned this pull request Feb 5, 2024
@starlinskiy starlinskiy mentioned this pull request Feb 12, 2024
@vitstn vitstn mentioned this pull request Feb 16, 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