From 118ed01777e86d347c6fe81c89f6db3283d83567 Mon Sep 17 00:00:00 2001 From: lance6716 Date: Thu, 8 Dec 2022 10:58:35 +0800 Subject: [PATCH] address comment Signed-off-by: lance6716 --- dm/pkg/checker/table_structure.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dm/pkg/checker/table_structure.go b/dm/pkg/checker/table_structure.go index 0c95efd015f..44765895c3f 100644 --- a/dm/pkg/checker/table_structure.go +++ b/dm/pkg/checker/table_structure.go @@ -231,7 +231,7 @@ func (c *TablesChecker) Check(ctx context.Context) *Result { pool.Go(worker.handle) } - dispatchTableItemWithDownstreamTable(c.tableMap, pool.PutJob) + dispatchTableItemWithDownstreamTable(c.tableMap, pool) if err := pool.Wait(); err != nil { markCheckError(r, err) @@ -930,12 +930,12 @@ func dispatchTableItem(ctx context.Context, tableMap map[string][]filter.Table, func dispatchTableItemWithDownstreamTable( tableMaps map[string]map[filter.Table][]filter.Table, - putJobFn func(*checkItem) bool, + pool *WorkerPool[*checkItem, []*incompatibilityOption], ) { for sourceID, tableMap := range tableMaps { for downTable, upTables := range tableMap { for _, upTable := range upTables { - ok := putJobFn(&checkItem{ + ok := pool.PutJob(&checkItem{ upstreamTable: upTable, downstreamTable: downTable, sourceID: sourceID,