Skip to content

Commit

Permalink
fixup! Fixed cloning empty partitioned table
Browse files Browse the repository at this point in the history
  • Loading branch information
juanpardo committed Aug 17, 2023
1 parent b2dcce5 commit c7fd3c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crate/operator/restore_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ async def shards_recovery_in_progress(
for t in tables:
(schema, table_name) = t.rsplit(".", 1)
try:
# If there is at least one shard, the table is not empty.
# We need to check that to ensure the operation does not fail while
# restoring empty partitioned tables.
await cursor.execute(
"SELECT id FROM sys.shards WHERE schema_name = %s "
"AND table_name = %s "
Expand Down

0 comments on commit c7fd3c6

Please sign in to comment.