-
Notifications
You must be signed in to change notification settings - Fork 638
schemeshard: fix copy-tables memory hog #1442
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
schemeshard: fix copy-tables memory hog #1442
Conversation
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
⚪
|
⚪
|
Changelog entry
Fix excessive memory requirements for backing up databases with massive amount of tables.
Changelog category
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