Rev 132: we should not lock in a normal ctdb_call(),
as we want them to run concurrently in http://samba.org/~tridge/ctdb
tridge at samba.org
tridge at samba.org
Tue Apr 17 06:34:54 GMT 2007
------------------------------------------------------------
revno: 132
revision-id: tridge at samba.org-20070417063453-11bf89e87ab63211
parent: tridge at samba.org-20070417062032-cf77c470b80c77d1
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Tue 2007-04-17 16:34:53 +1000
message:
we should not lock in a normal ctdb_call(), as we want them to run concurrently
modified:
common/ctdb_client.c ctdb_client.c-20070411010216-3kd8v37k61steeya-1
=== modified file 'common/ctdb_client.c'
--- a/common/ctdb_client.c 2007-04-17 06:20:32 +0000
+++ b/common/ctdb_client.c 2007-04-17 06:34:53 +0000
@@ -245,22 +245,14 @@
ux_socket_connect(ctdb);
}
- ret = ctdb_ltdb_lock(ctdb_db, call->key);
- if (ret != 0) {
- printf("failed to lock ltdb record\n");
- return NULL;
- }
-
ret = ctdb_ltdb_fetch(ctdb_db, call->key, &header, ctdb_db, &data);
if (ret != 0) {
- ctdb_ltdb_unlock(ctdb_db, call->key);
return NULL;
}
#if 0
if (header.dmaster == ctdb->vnn && !(ctdb->flags & CTDB_FLAG_SELF_CONNECT)) {
state = ctdb_call_local_send(ctdb_db, call, &header, &data);
- ctdb_ltdb_unlock(ctdb_db, call->key);
return state;
}
#endif
@@ -268,7 +260,6 @@
state = talloc_zero(ctdb_db, struct ctdb_call_state);
if (state == NULL) {
printf("failed to allocate state\n");
- ctdb_ltdb_unlock(ctdb_db, call->key);
return NULL;
}
@@ -278,7 +269,6 @@
state->c = ctdbd_allocate_pkt(ctdb, len);
if (state->c == NULL) {
printf("failed to allocate packet\n");
- ctdb_ltdb_unlock(ctdb_db, call->key);
return NULL;
}
talloc_set_name_const(state->c, "ctdbd req_call packet");
@@ -318,7 +308,6 @@
ctdb_call_timeout, state);
*/
- ctdb_ltdb_unlock(ctdb_db, call->key);
return state;
}
More information about the samba-cvs
mailing list