Skip to content

fix(cluster_family): Cancel slot migration in case of OOM errors on t… #5000

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mkaruza
Copy link
Contributor

@mkaruza mkaruza commented Apr 25, 2025

…arget node

We should cancel slot migration in case of OOM reported back.

…arget node

We should cancel slot migration in case of OOM reported back.

Signed-off-by: mkaruza <[email protected]>
@mkaruza mkaruza requested a review from BorysTheDev April 25, 2025 11:16
@mkaruza mkaruza marked this pull request as draft April 25, 2025 11:16
@@ -1045,7 +1046,23 @@ void ClusterFamily::DflyMigrateAck(CmdArgList args, SinkReplyBuilder* builder) {
return builder->SendError(kIdNotFound);

if (!migration->Join(attempt)) {
return builder->SendError("Join timeout happened");
// Cleanup migraton that resulted in error
if (migration->GetState() == MigrationState::C_ERROR) {
Copy link
Contributor

@BorysTheDev BorysTheDev Apr 26, 2025

Choose a reason for hiding this comment

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

I suggest adding state C_FATAL, to notify control plane that migration can not be finished, and prevent restart migration with error

if (migration->GetState() == MigrationState::C_ERROR) {
// Restore previous cluster configuration
server_family_->service().proactor_pool().AwaitFiberOnAll(
[](util::ProactorBase*) { ClusterConfig::RestorePrevious(); });
Copy link
Contributor

Choose a reason for hiding this comment

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

we shouldn't change the config, it can be dangerous.

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.

2 participants