Repository navigation
Reject dumps of tables with generated columns - #59402
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Validation runs before exclusion filtering and during metadata-only lookups, causing excluded generated-column tables to abort backups and incorrectly rejecting direct changefeed dumps.
1 open issue
What changed in this PR
This PR adds coordinated CLI and server checks to reject table dumps containing STORED or VIRTUAL generated columns, while preserving ordinary DescribeTable behavior.
Changes:
- Marks backup table descriptions using existing request metadata.
- Returns
UNSUPPORTEDfor dump requests involving generated columns. - Adds CLI rejection coverage across dump modes and a regular-description regression test.
| File | Description |
|---|---|
ydb/tests/functional/ydb_cli/test_ydb_backup.py |
Tests generated-column dump rejection across column kinds and dump modes. |
ydb/library/backup/backup.cpp |
Tags table descriptions with the dump request type. |
ydb/core/kqp/ut/scheme/kqp_generated_columns_ut.cpp |
Checks that ordinary descriptions still support generated columns with WithSetVal. |
ydb/core/grpc_services/rpc_describe_table.cpp |
Rejects dump-tagged descriptions of tables with generated columns. |
Review effort: Balanced
|
⚪ ⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
AI Review Summary
Verdict: ✅ No Critical or Major issues found
Critical and Major issues
No Critical or Major issues found.
Other findings
- Minor | Medium: Redundant extra DescribeTable RPC per table on the dump critical path —
ydb/library/backup/backup.cpp:1227 - Minor | Medium: Generated-column dump gate covers only the row-table branch; column tables return earlier and are never checked —
ydb/core/grpc_services/rpc_describe_table.cpp:180 - Minor | Medium: New unit test asserts only success and column count; no assertion on set_val content and no dump-request-type case —
ydb/core/kqp/ut/scheme/kqp_generated_columns_ut.cpp:1044 - Minor | Medium: Missing negative control that Serial (sequence-default) and literal-default columns still dump with RequestType("dump") —
ydb/tests/functional/ydb_cli/test_ydb_backup.py:406
This review was generated automatically. Critical and Major issues require attention; Minor and Nit findings are advisory.
If this comment was useful, please give it a 👍 — it helps us improve the review bot.
|
⚪ ⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ ⚪ Details
⚪
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |

Changelog entry
Reject dumps of tables with
STOREDorVIRTUALgenerated columns.Description for reviewers
Dump saves table schemas as
Ydb::Table::CreateTableRequest, which does not support generated-column definitions. ReturnUNSUPPORTEDfor these dumps to avoid losing schema information.DescribeTable, backup exclusions, and direct changefeed dumps.