Skip to content

Commit 1b16620

Browse files
mysql_cdc: add lint rule to max workers
1 parent eee6578 commit 1b16620

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

internal/impl/mysql/input_mysql_stream.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ This input adds the following metadata fields to each message:
113113
Description("If set to true, the connector will query all the existing data as a part of snapshot process. Otherwise, it will start from the current binlog position."),
114114
service.NewIntField(fieldMaxParallelSnapshotTables).
115115
Description("Specifies the number of tables that will be snapshotted in parallel.").
116-
Default(1),
116+
Default(1).
117+
LintRule(`root = if this < 1 { [ "` + fieldMaxParallelSnapshotTables + ` must be at least 1" ] }`),
117118
service.NewAutoRetryNacksToggleField(),
118119
service.NewIntField(fieldCheckpointLimit).
119120
Description("The maximum number of messages that can be processed at a given time. Increasing this limit enables parallel processing and batching at the output level. Any given BinLog Position will not be acknowledged unless all messages under that offset are delivered in order to preserve at least once delivery guarantees.").

0 commit comments

Comments
 (0)