summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2012-05-25 15:57:14 +1000
committerAmitay Isaacs <amitay@gmail.com>2012-05-28 11:22:28 +1000
commit9881ec8e644296c60b33dfee1f4b3e7a938916e7 (patch)
tree9a93ec8c98029e2525be41909ec1869af3a08c68
parent0cb1cc631d535c03f6ce272150b1a89b51f34422 (diff)
downloadsamba-9881ec8e644296c60b33dfee1f4b3e7a938916e7.tar.gz
samba-9881ec8e644296c60b33dfee1f4b3e7a938916e7.tar.xz
samba-9881ec8e644296c60b33dfee1f4b3e7a938916e7.zip
tests: Increment RSN always in ctdb_update_record_persistent test
If the record does not exist in persistent DB, RSN for that record is considered 0. To write a record, RSN for that record should be set to 1, otherwise the RSN check would fail. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit ac89da4eea98fa686408c5671a6c44c0fd1d7a58)
-rw-r--r--ctdb/tests/src/ctdb_update_record_persistent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/tests/src/ctdb_update_record_persistent.c b/ctdb/tests/src/ctdb_update_record_persistent.c
index 18156f8118..07b2c48250 100644
--- a/ctdb/tests/src/ctdb_update_record_persistent.c
+++ b/ctdb/tests/src/ctdb_update_record_persistent.c
@@ -42,8 +42,8 @@ static void update_once(struct ctdb_context *ctdb, struct event_context *ev, str
olddata = tdb_fetch(ctdb_db->ltdb->tdb, key);
if (olddata.dsize != 0) {
memcpy(&header, olddata.dptr, sizeof(header));
- header.rsn++;
- }
+ }
+ header.rsn++;
if (ctdb_ctrl_updaterecord(ctdb, ctdb, timeval_zero(), CTDB_CURRENT_NODE, ctdb_db, key, &header, data) != 0) {
printf("Failed to update record\n");