Skip to content

Commit b99e82d

Browse files
authored
Fix format (#302)
1 parent 44229b7 commit b99e82d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

pkg/ccr/job.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2580,19 +2580,12 @@ func (j *Job) handleRecoverInfo(binlog *festruct.TBinlog) error {
25802580
return j.handleRecoverInfoRecord(binlog.GetCommitSeq(), recoverInfo)
25812581
}
25822582

2583-
func isRecoverTable(recoverInfo *record.RecoverInfo) bool {
2584-
if recoverInfo.PartitionName == "" || recoverInfo.PartitionId == -1 {
2585-
return true
2586-
}
2587-
return false
2588-
}
2589-
25902583
func (j *Job) handleRecoverInfoRecord(commitSeq int64, recoverInfo *record.RecoverInfo) error {
25912584
if j.isBinlogCommitted(recoverInfo.TableId, commitSeq) {
25922585
return nil
25932586
}
25942587

2595-
if isRecoverTable(recoverInfo) {
2588+
if recoverInfo.IsRecoverTable() {
25962589
var tableName string
25972590
if recoverInfo.NewTableName != "" {
25982591
tableName = recoverInfo.NewTableName

pkg/ccr/record/recover_info.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ func NewRecoverInfoFromJson(data string) (*RecoverInfo, error) {
3636
return &recoverInfo, nil
3737
}
3838

39+
func (c *RecoverInfo) IsRecoverTable() bool {
40+
if c.PartitionName == "" || c.PartitionId == -1 {
41+
return true
42+
}
43+
return false
44+
}
45+
3946
// String
4047
func (c *RecoverInfo) String() string {
4148
return fmt.Sprintf("RecoverInfo: DbId: %d, NewDbName: %s, TableId: %d, TableName: %s, NewTableName: %s, PartitionId: %d, PartitionName: %s, NewPartitionName: %s",

pkg/rpc/kitex_gen/frontendservice/FrontendService.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)