Skip to content

Commit 80f4ffe

Browse files
LordofAvernusffffwh
authored and
ffffwh
committed
feat : api v2 support DumpEntryLimit config
1 parent f9ae8bb commit 80f4ffe

File tree

6 files changed

+14
-1
lines changed

6 files changed

+14
-1
lines changed

api/docs/docs.go

+3
Original file line numberDiff line numberDiff line change
@@ -3017,6 +3017,9 @@ var doc = `{
30173017
"binlog_relay": {
30183018
"type": "boolean"
30193019
},
3020+
"dump_entry_limit": {
3021+
"type": "integer"
3022+
},
30203023
"expand_syntax_support": {
30213024
"type": "boolean"
30223025
},

api/docs/swagger.json

+3
Original file line numberDiff line numberDiff line change
@@ -3001,6 +3001,9 @@
30013001
"binlog_relay": {
30023002
"type": "boolean"
30033003
},
3004+
"dump_entry_limit": {
3005+
"type": "integer"
3006+
},
30043007
"expand_syntax_support": {
30053008
"type": "boolean"
30063009
},

api/docs/swagger.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,8 @@ definitions:
591591
type: boolean
592592
binlog_relay:
593593
type: boolean
594+
dump_entry_limit:
595+
type: integer
594596
expand_syntax_support:
595597
type: boolean
596598
gtid:

api/handler/v2/job.go

+4
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ func buildDatabaseSrcTaskConfigMap(config *models.SrcTaskConfig) map[string]inte
592592
addNotRequiredParamToMap(taskConfigInNomadFormat, config.MysqlSrcTaskConfig.BinlogRelay, "BinlogRelay")
593593
addNotRequiredParamToMap(taskConfigInNomadFormat, config.MysqlSrcTaskConfig.Gtid, "Gtid")
594594
addNotRequiredParamToMap(taskConfigInNomadFormat, config.MysqlSrcTaskConfig.ExpandSyntaxSupport, "ExpandSyntaxSupport")
595+
addNotRequiredParamToMap(taskConfigInNomadFormat, config.MysqlSrcTaskConfig.DumpEntryLimit, "DumpEntryLimit")
595596
taskConfigInNomadFormat["ConnectionConfig"] = buildMysqlConnectionConfigMap(config.ConnectionConfig)
596597
}
597598
// for Oracle
@@ -799,6 +800,7 @@ func buildBasicTaskProfile(logger g.LoggerType, jobId string, srcTaskDetail *mod
799800
BinlogRelay: srcTaskDetail.TaskConfig.MysqlSrcTaskConfig.BinlogRelay,
800801
WaitOnJob: srcTaskDetail.TaskConfig.MysqlSrcTaskConfig.WaitOnJob,
801802
AutoGtid: srcTaskDetail.TaskConfig.MysqlSrcTaskConfig.AutoGtid,
803+
DumpEntryLimit: srcTaskDetail.TaskConfig.MysqlSrcTaskConfig.DumpEntryLimit,
802804
}
803805
} else if srcTaskDetail.TaskConfig.OracleSrcTaskConfig != nil {
804806
srcConfig.OracleSrcTaskConfig = &models.OracleSrcTaskConfig{
@@ -1000,6 +1002,7 @@ func buildSrcTaskDetail(taskName string, internalTaskConfig common.DtleTaskConfi
10001002
Gtid: internalTaskConfig.Gtid,
10011003
BinlogRelay: internalTaskConfig.BinlogRelay,
10021004
WaitOnJob: internalTaskConfig.WaitOnJob,
1005+
DumpEntryLimit: internalTaskConfig.DumpEntryLimit,
10031006
}
10041007
}
10051008
srcTaskDetail.TaskConfig.ConnectionConfig = connectionConfig
@@ -1932,6 +1935,7 @@ func ReverseJobV2(c echo.Context, filterJobType DtleJobType) error {
19321935
BinlogRelay: originalJob.BasicTaskProfile.Configuration.SrcConfig.MysqlSrcTaskConfig.BinlogRelay,
19331936
WaitOnJob: consulJobItem.JobId,
19341937
AutoGtid: true,
1938+
DumpEntryLimit: originalJob.BasicTaskProfile.Configuration.SrcConfig.MysqlSrcTaskConfig.DumpEntryLimit,
19351939
},
19361940
}
19371941
reverseJobParam.DestTask = &models.DestTaskConfig{

api/models/job_v2.go

+1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ type MysqlSrcTaskConfig struct {
152152
BinlogRelay bool `json:"binlog_relay"`
153153
WaitOnJob string `json:"wait_on_job"`
154154
AutoGtid bool `json:"auto_gtid"`
155+
DumpEntryLimit int `json:"dump_entry_limit"`
155156
}
156157

157158
type OracleSrcTaskConfig struct {

driver/driver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ var (
169169
"ForeignKeyChecks": hclspec.NewDefault(hclspec.NewAttr("ForeignKeyChecks", "bool", false),
170170
hclspec.NewLiteral(`true`)),
171171
"DumpEntryLimit": hclspec.NewDefault(hclspec.NewAttr("DumpEntryLimit", "number", false),
172-
hclspec.NewLiteral(`134217728`)),
172+
hclspec.NewLiteral(`67108864`)),
173173
"OracleConfig": hclspec.NewBlock("OracleConfig", false, hclspec.NewObject(map[string]*hclspec.Spec{
174174
"ServiceName": hclspec.NewAttr("ServiceName", "string", true),
175175
"Host": hclspec.NewAttr("Host", "string", true),

0 commit comments

Comments
 (0)