Skip to content

Commit d9536cb

Browse files
committed
fix: Flush DeleteRecord messages when batch writer is flushed
1 parent c82d006 commit d9536cb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

writers/batchwriter/batchwriter.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ func (w *BatchWriter) Flush(ctx context.Context) error {
107107
if err := w.flushMigrateTables(ctx); err != nil {
108108
return err
109109
}
110-
return w.flushDeleteStaleTables(ctx)
110+
if err := w.flushDeleteStaleTables(ctx); err != nil {
111+
return err
112+
}
113+
return w.flushDeleteRecordTables(ctx)
111114
}
112115

113116
func (w *BatchWriter) Close(context.Context) error {

0 commit comments

Comments
 (0)