diff --git a/internal/datanode/data_sync_service.go b/internal/datanode/data_sync_service.go index 91cf033d7f0e3..c21d5ef86ec94 100644 --- a/internal/datanode/data_sync_service.go +++ b/internal/datanode/data_sync_service.go @@ -117,6 +117,12 @@ func (dsService *dataSyncService) close() { log.Info("dataSyncService flowgraph closed") } + if dsService.compactor != nil { + log.Info("dataSyncService discarding compaction plans") + dsService.compactor.discardPlan(dsService.vchannelName) + log.Info("dataSyncService compaction plans discarded") + } + dsService.clearGlobalFlushingCache() close(dsService.flushCh)