Skip to content

Commit

Permalink
Merge pull request #740 from smukil/in_flight_nonrepairable_crash_fix
Browse files Browse the repository at this point in the history
Turning on repairs shouldn't invoke repairs for in-flight queries
  • Loading branch information
smukil committed Nov 4, 2019
2 parents fccf059 + 437448f commit 8464a60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/proto/dyn_redis_repair.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,10 @@ rstatus_t redis_make_repair_query(struct context *ctx, struct response_mgr *rspm
bool repair_by_add = false;
uint32_t num_values = 0;

// If we enabled read repairs halfway, in flight commands will not be
// repairable.
if (rspmgr->msg->orig_msg == NULL) return DN_OK;

// Redis commands either lookup keys or fields (secondary keys), so the number of
// expected values would be based on either one of them.
if (rspmgr->msg->orig_msg->msg_info.num_fields > 0) {
Expand Down

0 comments on commit 8464a60

Please sign in to comment.