Skip to content

Commit facf6dc

Browse files
committed
Not call truncate for table drop
1 parent f2b54b9 commit facf6dc

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

crates/datastore/src/locking_tx_datastore/committed_state.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,6 @@ impl CommittedState {
706706
for change in pending_schema_changes {
707707
if let PendingSchemaChange::TableRemoved(table_id, mut table) = change {
708708
let row_ptrs = table.scan_all_row_ptrs();
709-
truncates.insert(table_id);
710709
delete_rows(
711710
tx_data,
712711
table_id,

crates/datastore/src/traits.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ pub struct TxData {
176176
inserts: BTreeMap<TableId, Arc<[ProductValue]>>,
177177
/// The deleted rows per table.
178178
deletes: BTreeMap<TableId, Arc<[ProductValue]>>,
179-
180-
/// The set of `TableId`s for tables that have been truncated.
179+
/// *Truncating* means that all rows in the table have been deleted.
180+
/// In other words, a truncated table is a cleared table.
181181
///
182-
/// “Truncating” means that all rows in the table have been deleted, or the table
183-
/// itself has been dropped
182+
/// Note that when a table has an entry in `truncates`,
183+
/// it will also have an entry in `deletes`.
184184
truncates: IntSet<TableId>,
185185
/// Map of all `TableId`s in both `inserts` and `deletes` to their
186186
/// corresponding table name.

0 commit comments

Comments
 (0)