From: Sage Weil Date: Thu, 13 Nov 2008 21:30:26 +0000 (-0800) Subject: mds: treat open requests as non-idempotent X-Git-Tag: v0.5~5^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=93914659103fb4c6eb76a0760dcb10db36e556f5;p=ceph.git mds: treat open requests as non-idempotent The problem is that the reply contains a capability, and as such is statefull and can't be lost. Forwards by the MDS on behalf of the client, however, introduce the possibility of multiple copies or a request in flight if one of the MDSs fails, and the client will drop any duplicate replies it receives. Alternatively, the client could _also_ parse duplicate responses (i.e. call fill_trace). I'm not sure if that's a good idea. In any case, MDS forwarded requests are only really important for dealing with flash flood scenarios on extremely large clusters, so let's just set this aside for now. --- diff --git a/src/messages/MClientRequest.h b/src/messages/MClientRequest.h index a5a2f9c79f774..6d76de6993eeb 100644 --- a/src/messages/MClientRequest.h +++ b/src/messages/MClientRequest.h @@ -79,7 +79,7 @@ public: } bool is_idempotent() { if (head.op == CEPH_MDS_OP_OPEN) - return open_file_mode_is_readonly(); + return false; //open_file_mode_is_readonly(); return (head.op & CEPH_MDS_OP_WRITE) == 0; } bool auth_is_best() {