|
|
14f8ab |
From 5a35a996257d6aaa7fa55ff1e1aac407dd4824fe Mon Sep 17 00:00:00 2001
|
|
|
14f8ab |
From: Sanju Rakonde <srakonde@redhat.com>
|
|
|
14f8ab |
Date: Fri, 12 Jul 2019 16:28:04 +0530
|
|
|
14f8ab |
Subject: [PATCH 252/255] glusterd: do not mark skip_locking as true for
|
|
|
14f8ab |
geo-rep operations
|
|
|
14f8ab |
|
|
|
14f8ab |
We need to send the commit req to peers in case of geo-rep
|
|
|
14f8ab |
operations even though it is a no volname operation. In commit
|
|
|
14f8ab |
phase peers try to set the txn_opinfo which will fail because
|
|
|
14f8ab |
it is a no volname operation where we don't require a commit
|
|
|
14f8ab |
phase. We mark skip_locking as true for no volname operations,
|
|
|
14f8ab |
but we have to give an exception to geo-rep operations, so that
|
|
|
14f8ab |
they can set txn_opinfo in commit phase.
|
|
|
14f8ab |
|
|
|
14f8ab |
Please refer to detailed RCA at the bug: 1729463
|
|
|
14f8ab |
|
|
|
14f8ab |
> upstream patch : https://review.gluster.org/#/c/glusterfs/+/23034/
|
|
|
14f8ab |
|
|
|
14f8ab |
>fixes: bz#1729463
|
|
|
14f8ab |
>Change-Id: I9f2478b12a281f6e052035c0563c40543493a3fc
|
|
|
14f8ab |
>Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
14f8ab |
|
|
|
14f8ab |
Change-Id: I9f2478b12a281f6e052035c0563c40543493a3fc
|
|
|
14f8ab |
BUG: 1727785
|
|
|
14f8ab |
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
14f8ab |
Reviewed-on: https://code.engineering.redhat.com/gerrit/176032
|
|
|
14f8ab |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
14f8ab |
Reviewed-by: Shwetha Acharya <sacharya@redhat.com>
|
|
|
14f8ab |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
14f8ab |
---
|
|
|
14f8ab |
xlators/mgmt/glusterd/src/glusterd-handler.c | 9 +++++++--
|
|
|
14f8ab |
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
14f8ab |
|
|
|
14f8ab |
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
|
|
|
14f8ab |
index cb2666b..2e73c98 100644
|
|
|
14f8ab |
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
|
|
|
14f8ab |
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
|
|
|
14f8ab |
@@ -1078,7 +1078,11 @@ __glusterd_handle_stage_op(rpcsvc_request_t *req)
|
|
|
14f8ab |
|
|
|
14f8ab |
/* In cases where there is no volname, the receivers won't have a
|
|
|
14f8ab |
* transaction opinfo created, as for those operations, the locking
|
|
|
14f8ab |
- * phase where the transaction opinfos are created, won't be called. */
|
|
|
14f8ab |
+ * phase where the transaction opinfos are created, won't be called.
|
|
|
14f8ab |
+ * skip_locking will be true for all such transaction and we clear
|
|
|
14f8ab |
+ * the txn_opinfo after the staging phase, except for geo-replication
|
|
|
14f8ab |
+ * operations where we need to access txn_opinfo in the later phases also.
|
|
|
14f8ab |
+ */
|
|
|
14f8ab |
ret = glusterd_get_txn_opinfo(txn_id, &txn_op_info);
|
|
|
14f8ab |
if (ret) {
|
|
|
14f8ab |
gf_msg_debug(this->name, 0, "No transaction's opinfo set");
|
|
|
14f8ab |
@@ -1087,7 +1091,8 @@ __glusterd_handle_stage_op(rpcsvc_request_t *req)
|
|
|
14f8ab |
glusterd_txn_opinfo_init(&txn_op_info, &state, &op_req.op,
|
|
|
14f8ab |
req_ctx->dict, req);
|
|
|
14f8ab |
|
|
|
14f8ab |
- txn_op_info.skip_locking = _gf_true;
|
|
|
14f8ab |
+ if (req_ctx->op != GD_OP_GSYNC_SET)
|
|
|
14f8ab |
+ txn_op_info.skip_locking = _gf_true;
|
|
|
14f8ab |
ret = glusterd_set_txn_opinfo(txn_id, &txn_op_info);
|
|
|
14f8ab |
if (ret) {
|
|
|
14f8ab |
gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_TRANS_OPINFO_SET_FAIL,
|
|
|
14f8ab |
--
|
|
|
14f8ab |
1.8.3.1
|
|
|
14f8ab |
|