Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat](binlog) Add Support recover binlog #284

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

Vallishp
Copy link
Contributor

@Vallishp Vallishp commented Nov 30, 2024

support recover table, recover partition
related PR: apache/doris#44818
Currently the recover flow, we will be do partial sync,

to can not gurantee the data present in the recycle bin of target.

Testcases run and passed.

  1. DbSync
    --- recover table
    --- recover table as new table.

    -- recover partition
    -- recover partition as new partition name.

  2. TableSync
    -- recover partition
    -- recover partition as new partition name.

@Vallishp Vallishp force-pushed the recover_info_binlog branch 2 times, most recently from 415b68a to 2a6113a Compare December 1, 2024 17:32
@Vallishp Vallishp marked this pull request as ready for review December 1, 2024 17:36
@Vallishp Vallishp force-pushed the recover_info_binlog branch 4 times, most recently from 3817091 to 844d57f Compare December 4, 2024 07:16
Copy link
Member

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Vallishp Vallishp force-pushed the recover_info_binlog branch from 844d57f to 9891339 Compare December 7, 2024 07:32
Copy link
Contributor

@w41ter w41ter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

Comment on lines 32 to 33
/* need check for db level not supported.
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the above check, and also check if the table name and partition name exist.

pkg/ccr/job.go Outdated
return nil
}

if recoverInfo.PartitionName == "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a helper function IsRecoverPartition() bool { return record.PartitionId == -1 }, and change below line to:

Suggested change
if recoverInfo.PartitionName == "" {
if recoverInfo.IsRecoverPartition() {

@Vallishp Vallishp force-pushed the recover_info_binlog branch from 9891339 to 131983c Compare December 9, 2024 08:31
@Vallishp Vallishp requested a review from w41ter December 9, 2024 08:32
@w41ter w41ter merged commit 44229b7 into selectdb:dev Dec 11, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants