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

fix clear copyset creating flag when create copyset success #1417

Merged
merged 1 commit into from
May 12, 2022

Conversation

cw123
Copy link
Contributor

@cw123 cw123 commented May 10, 2022

What problem does this PR solve?

Issue Number: #1382

Problem Summary: Copyset is not automatically migrated after stopping metaserver

What is changed and how it works?

What's Changed: fix clear copyset creating flag when create copyset success

When copyset created success, it should clear the copyset creating flag. But the code miss this in code.

@cw123
Copy link
Contributor Author

cw123 commented May 11, 2022

recheck

@cw123 cw123 force-pushed the fix_copyset_creating_flag branch from 0f24cd6 to bfac19d Compare May 11, 2022 02:34
@cw123
Copy link
Contributor Author

cw123 commented May 11, 2022

recheck

1 similar comment
@YunhuiChen
Copy link
Contributor

recheck

Copy link
Contributor

@Wine93 Wine93 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@Wine93 Wine93 left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -866,6 +866,7 @@ TopoStatusCode TopologyManager::CreateCopyset(
return ret;
}

ClearCopysetCreating(copyset.poolId, copyset.copysetId);
Copy link
Contributor

Choose a reason for hiding this comment

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

it's better to move this line of code before 856 and remove line 865, so you don't have to repeat it.

and should you add some unit test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

虽然都是去掉creating的标记,但是清理的时机是不一样的。如果都挪到856行,和原意还是有区别的。

Although the marking of creating is removed, the timing of cleaning is different. If it is moved to line 856, it is still different from the original intention.

@cw123 cw123 force-pushed the fix_copyset_creating_flag branch from bfac19d to a8f909c Compare May 12, 2022 08:51
@cw123 cw123 merged commit 0eb9841 into opencurve:master May 12, 2022
@cw123 cw123 deleted the fix_copyset_creating_flag branch May 12, 2022 11:34
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.

None yet

4 participants