diff options
author | Keith Bostic <keith@wiredtiger.com> | 2012-06-16 10:55:25 +0000 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2012-06-16 10:55:25 +0000 |
commit | 5f334c9654de08fbc6ba51e706fb9a912c52c36a (patch) | |
tree | 8a926a315d461dd7505ac00b679dc77cb89c4e42 /test/fops | |
parent | b3c90af0a6eb756c387288750e043fdec86dd659 (diff) | |
download | mongo-5f334c9654de08fbc6ba51e706fb9a912c52c36a.tar.gz |
Rename the "snapshot" config key in session.checkpoint to "name".
Delete the session.sync method, replace session.sync calls with
session.checkpoint calls, setting "target=(uri),name=xxx".
Add a "drop" config key to session.checkpoint, providing a list of
snapshot names to discard. Replace session.drop snapshot discard
calls with calls to session.checkpoint.
Rework relevant documentation.
Diffstat (limited to 'test/fops')
-rw-r--r-- | test/fops/file.c | 10 | ||||
-rw-r--r-- | test/fops/fops.c | 10 | ||||
-rw-r--r-- | test/fops/thread.h | 2 |
3 files changed, 13 insertions, 9 deletions
diff --git a/test/fops/file.c b/test/fops/file.c index 2817fefef8e..14925bd2c8f 100644 --- a/test/fops/file.c +++ b/test/fops/file.c @@ -42,7 +42,7 @@ obj_drop(void) } void -obj_sync(void) +obj_checkpoint(void) { WT_SESSION *session; int ret; @@ -50,9 +50,13 @@ obj_sync(void) if ((ret = conn->open_session(conn, NULL, NULL, &session)) != 0) die("conn.session", ret); - if ((ret = session->sync(session, uri, NULL)) != 0) + /* + * Name the checkpoint so a snapshot has to be taken, don't specify + * a target, it might not exist. + */ + if ((ret = session->checkpoint(session, "name=fops")) != 0) if (ret != ENOENT) - die("session.sync", ret); + die("session.checkpoint", ret); if ((ret = session->close(session, NULL)) != 0) die("session.close", ret); diff --git a/test/fops/fops.c b/test/fops/fops.c index c1a3abb64bd..1dc777e9df5 100644 --- a/test/fops/fops.c +++ b/test/fops/fops.c @@ -13,7 +13,7 @@ static void print_stats(u_int); typedef struct { int create; /* session.create */ int drop; /* session.drop */ - int sync; /* session.sync */ + int ckpt; /* session.checkpoint */ int upgrade; /* session.upgrade */ int verify; /* session.verify */ } STATS; @@ -117,8 +117,8 @@ fop(void *arg) obj_drop(); break; case 2: - ++s->sync; - obj_sync(); + ++s->ckpt; + obj_checkpoint(); break; case 3: ++s->upgrade; @@ -148,7 +148,7 @@ print_stats(u_int nthreads) s = run_stats; for (id = 0; id < nthreads; ++id, ++s) printf( - "%3d: create %6d, drop %6d, sync %6d, upgrade %6d, " + "%3d: create %6d, drop %6d, ckpt %6d, upgrade %6d, " "verify %6d\n", - id, s->create, s->drop, s->sync, s->upgrade, s->verify); + id, s->create, s->drop, s->ckpt, s->upgrade, s->verify); } diff --git a/test/fops/thread.h b/test/fops/thread.h index f3f17abeae9..fdfc333abd1 100644 --- a/test/fops/thread.h +++ b/test/fops/thread.h @@ -33,8 +33,8 @@ void die(const char *, int) __attribute__((noreturn)); void die(const char *, int); #endif int fop_start(u_int); +void obj_checkpoint(void); void obj_create(void); void obj_drop(void); -void obj_sync(void); void obj_upgrade(void); void obj_verify(void); |