summaryrefslogtreecommitdiff
path: root/ctdb/client/client_db.c
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2016-04-19 15:24:11 +1000
committerMartin Schwenke <martins@samba.org>2016-07-05 10:53:14 +0200
commit3888439971afd81745e275086fd1142dd78b8aa8 (patch)
tree1d0a7d4d263c240dd4deb64b2d6415b86a100056 /ctdb/client/client_db.c
parentf00319f0bcbeab728f78748b487154b75f84f796 (diff)
downloadsamba-3888439971afd81745e275086fd1142dd78b8aa8.tar.gz
ctdb-client: Factor out ctdb_client_get_server_id function
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/client/client_db.c')
-rw-r--r--ctdb/client/client_db.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/ctdb/client/client_db.c b/ctdb/client/client_db.c
index d5633d77043..09d9f23ecac 100644
--- a/ctdb/client/client_db.c
+++ b/ctdb/client/client_db.c
@@ -1747,13 +1747,9 @@ struct tevent_req *ctdb_transaction_start_send(TALLOC_CTX *mem_ctx,
h->readonly = readonly;
h->updated = false;
- /* SRVID is unique for databases, so client can have transactions active
- * for multiple databases */
- h->sid.pid = getpid();
- h->sid.task_id = db->db_id;
- h->sid.vnn = state->destnode;
- h->sid.unique_id = h->sid.task_id;
- h->sid.unique_id = (h->sid.unique_id << 32) | h->sid.pid;
+ /* SRVID is unique for databases, so client can have transactions
+ * active for multiple databases */
+ h->sid = ctdb_client_get_server_id(client, db->db_id);
h->recbuf = ctdb_rec_buffer_init(h, db->db_id);
if (tevent_req_nomem(h->recbuf, req)) {