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

Update hiredis-cluster to 0.14.0 from 0.11.0 #48

Merged
merged 9 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion META.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"plainbanana <[email protected]>"
],
"dynamic_config" : 0,
"generated_by" : "Minilla/v3.1.22, CPAN::Meta::Converter version 2.150005",
"generated_by" : "Minilla/v3.1.23, CPAN::Meta::Converter version 2.150005",
"license" : [
"perl_5"
],
Expand Down
11 changes: 11 additions & 0 deletions src/Fast.xs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,17 @@ void Redis__Cluster__Fast_run_cmd(pTHX_ Redis__Cluster__Fast self, int argc, con
return;
}
redisClusterAsyncDisconnect(self->acc);

if (event_base_dispatch(self->cluster_event_base) == -1) {
reply_t->error = newSVpvf("%s", "event_base_dispatch failed after forking");
return;
}

if (redisClusterConnect2(self->acc->cc) != REDIS_OK) {
Copy link
Owner Author

Choose a reason for hiding this comment

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

[MEMO]

I implemented (1.) as it allows for a more simple solution.

Issue event_reinit and redisClusterAsyncDisconnect, then use redisClusterConnect2 to clear the shutdown flag and reconnect.

Since there’s no significant difference, either method should work.

reply_t->error = newSVpvf("failed to re-connect: %s", self->acc->cc->errstr);
return;
}

self->pid = current_pid;
}

Expand Down
Loading