Current message as below in sheep_exec_req is rather confused.

ERROR [rw 6471] sheep_exec_req(1133) failed No object found

In fact, I don't know which node sends the request and what it
wants to do. They are the minimum requirements for any investigation.

I think this is very helpful to diagnose an issue.

ERROR [rw 16160] sheep_exec_req(1135) failed No object found,
remote address: 127.0.0.1:7002, op name: GET_HASH

Signed-off-by: Ruoyu <lian...@ucweb.com>
---
 sheep/request.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sheep/request.c b/sheep/request.c
index dc5e5a2..f2ccff6 100644
--- a/sheep/request.c
+++ b/sheep/request.c
@@ -1130,7 +1130,10 @@ worker_fn int sheep_exec_req(const struct node_id *nid, 
struct sd_req *hdr,
        }
        ret = rsp->result;
        if (ret != SD_RES_SUCCESS)
-               sd_err("failed %s", sd_strerror(ret));
+               sd_err("failed %s, remote address: %s, op name: %s",
+                               sd_strerror(ret),
+                               addr_to_str(nid->addr, nid->port),
+                               op_name(get_sd_op(hdr->opcode)));
 
        sockfd_cache_put(nid, sfd);
        return ret;
-- 
1.8.3.2


-- 
sheepdog mailing list
sheepdog@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to