ReadOnly: Change the update_record test tool to use the new fetchlock routine that...
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 21 Jul 2011 05:58:56 +0000 (15:58 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 23 Aug 2011 00:35:15 +0000 (10:35 +1000)
tests/src/ctdb_update_record.c

index 823dfa3c8279aa29b9672702ead41c7f4a2a5606..5f4b9c1e2154ccc86100e6c3f544bc038cf4403e 100644 (file)
@@ -46,7 +46,7 @@ static void fetch_lock_once(struct ctdb_context *ctdb, struct event_context *ev,
 
        printf("Trying to fetch lock the record ...\n");
 
-       h = ctdb_fetch_lock(ctdb_db, tmp_ctx, key, &data);
+       h = ctdb_fetch_readonly_lock(ctdb_db, tmp_ctx, key, &data, false);
        if (h == NULL) {
                printf("Failed to fetch record '%s' on node %d\n", 
                        (const char *)key.dptr, ctdb_get_pnn(ctdb));
@@ -57,8 +57,6 @@ static void fetch_lock_once(struct ctdb_context *ctdb, struct event_context *ev,
        printf("Record fetchlocked.\n");
        header = talloc_memdup(tmp_ctx, ctdb_header_from_record_handle(h), sizeof(*header));
                printf("RSN:%d\n", (int)header->rsn);
-       printf("Press enter to release the record ...\n");
-       (void)getchar();
        talloc_free(h);
        printf("Record released.\n");