glusterd: Use txn_opinfo instead of global op_info in glusterd_volume_heal_use_rsp_dict
Due to http://review.gluster.org/#/c/9908/ global opinfo is no more a valid place holder for keeping transaction information for syncop task. glusterd_volume_heal_use_rsp_dict () was referring to global op_info due to which the function was always asserting on the op code. Change-Id: I1d416fe4edb40962fe7a0f6ecf541602debac56e BUG: 1206655 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/10034 Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
This commit is contained in:
parent
d5a9607598
commit
3b647e1012
@ -8302,20 +8302,35 @@ out:
|
||||
int
|
||||
glusterd_volume_heal_use_rsp_dict (dict_t *aggr, dict_t *rsp_dict)
|
||||
{
|
||||
int ret = 0;
|
||||
dict_t *ctx_dict = NULL;
|
||||
glusterd_op_t op = GD_OP_NONE;
|
||||
int ret = 0;
|
||||
dict_t *ctx_dict = NULL;
|
||||
uuid_t *txn_id = NULL;
|
||||
glusterd_op_info_t txn_op_info = {{0},};
|
||||
glusterd_op_t op = GD_OP_NONE;
|
||||
|
||||
GF_ASSERT (rsp_dict);
|
||||
|
||||
op = glusterd_op_get_op ();
|
||||
ret = dict_get_bin (aggr, "transaction_id", (void **)&txn_id);
|
||||
if (ret)
|
||||
goto out;
|
||||
gf_log (THIS->name, GF_LOG_DEBUG, "transaction ID = %s",
|
||||
uuid_utoa (*txn_id));
|
||||
|
||||
ret = glusterd_get_txn_opinfo (txn_id, &txn_op_info);
|
||||
if (ret) {
|
||||
gf_log (THIS->name, GF_LOG_ERROR, "Failed to get txn_op_info "
|
||||
"for txn_id = %s", uuid_utoa (*txn_id));
|
||||
goto out;
|
||||
}
|
||||
|
||||
op = txn_op_info.op;
|
||||
GF_ASSERT (GD_OP_HEAL_VOLUME == op);
|
||||
|
||||
if (aggr) {
|
||||
ctx_dict = aggr;
|
||||
|
||||
} else {
|
||||
ctx_dict = glusterd_op_get_ctx (op);
|
||||
ctx_dict = txn_op_info.op_ctx;
|
||||
}
|
||||
|
||||
if (!ctx_dict)
|
||||
|
Loading…
x
Reference in New Issue
Block a user