Skip to content

Commit 3ca44c5

Browse files
committed
add some comment
1 parent 3cf83be commit 3ca44c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/ddl/reorg.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ func newReorgTableMutateContext(exprCtx exprctx.ExprContext) table.MutateContext
246246
exprCtx: exprCtx,
247247
encodingConfig: encodingConfig,
248248
mutateBuffers: tbctx.NewMutateBuffers(&variable.WriteStmtBufs{}),
249+
// Though currently, `RowIDShardGenerator` is not required in DDL reorg,
250+
// we still provide a valid one to make the code more robust and to avoid panic if it is used in the future.
249251
shardID: variable.NewRowIDShardGenerator(
250252
rand.New(rand.NewSource(time.Now().UnixNano())), // #nosec G404
251253
variable.DefTiDBShardAllocateStep,

0 commit comments

Comments
 (0)