ctdb_call: remove requirement that read-only requests be FETCH_WITH_HEADER master
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 1 Dec 2011 03:36:55 +0000 (14:06 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 1 Dec 2011 03:42:11 +0000 (14:12 +1030)
The original read-only record design had the client updating the local
copy of the header in the local tdb; ctdbd now does that itself, so
there's no reason that the client needs to fetch the record with header
to get a read-only copy.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
server/ctdb_call.c

index f7d1eca6bff918ddef30d71e590c854ad10a6a96..54c14c2e1811f41d9460176333bac1627f34d318 100644 (file)
@@ -575,7 +575,6 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
         * the delegations flag
         */
        if ((c->flags & CTDB_WANT_READONLY)
-       &&  (c->callid == CTDB_FETCH_WITH_HEADER_FUNC)
        &&  (!(header.flags & CTDB_REC_RO_HAVE_DELEGATIONS))) {
                header.rsn     += 3;
                header.flags   |= CTDB_REC_RO_HAVE_DELEGATIONS;
@@ -583,8 +582,7 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
                        ctdb_fatal(ctdb, "Failed to store record with HAVE_DELEGATIONS set");
                }
        }
-       if ((c->flags & CTDB_WANT_READONLY) 
-       &&  (call->call_id == CTDB_FETCH_WITH_HEADER_FUNC)) {
+       if (c->flags & CTDB_WANT_READONLY)  {
                TDB_DATA tdata;
 
                tdata = tdb_fetch(ctdb_db->rottdb, call->key);