diff options
author | Michael Cahill <michael.cahill@wiredtiger.com> | 2012-10-18 23:21:59 +1100 |
---|---|---|
committer | Michael Cahill <michael.cahill@wiredtiger.com> | 2012-10-18 23:21:59 +1100 |
commit | 74f8f4eeea589548c659838ccfe49df5a9615a3a (patch) | |
tree | d3dfcd5aea4212c70e34924820e3025e883cf145 | |
parent | 0b379de0b41b67d2101b721460a02a98fac7937d (diff) | |
download | mongo-74f8f4eeea589548c659838ccfe49df5a9615a3a.tar.gz |
Run some standard tests against table-on-LSM.
-rw-r--r-- | src/lsm/lsm_cursor.c | 2 | ||||
-rw-r--r-- | test/fops/t.c | 16 | ||||
-rw-r--r-- | test/suite/test_base02.py | 10 | ||||
-rw-r--r-- | test/suite/test_drop.py | 9 |
4 files changed, 24 insertions, 13 deletions
diff --git a/src/lsm/lsm_cursor.c b/src/lsm/lsm_cursor.c index 63a25b18467..7ad270d9987 100644 --- a/src/lsm/lsm_cursor.c +++ b/src/lsm/lsm_cursor.c @@ -201,7 +201,7 @@ err: __wt_spin_unlock(session, &lsm_tree->lock); } /* __wt_clsm_init_merge -- - * Initialize an LSM cursor for a (major) merge. + * Initialize an LSM cursor for a merge. */ int __wt_clsm_init_merge(WT_CURSOR *cursor, int start_chunk, int nchunks) diff --git a/test/fops/t.c b/test/fops/t.c index f697f7fe30e..7f6367b87f3 100644 --- a/test/fops/t.c +++ b/test/fops/t.c @@ -28,13 +28,16 @@ main(int argc, char *argv[]) { static struct config { const char *uri; + const char *desc; const char *config; } *cp, configs[] = { - { "file:__wt", NULL }, - { "table:__wt", NULL }, - { "lsm:__wt", - "lsm_chunk_size=1m,lsm_merge_max=2,leaf_page_max=256k" }, - { NULL, NULL } + { "file:__wt", NULL, NULL }, + { "table:__wt", NULL, NULL }, +/* Configure for a modest cache size. */ +#define LSM_CONFIG "lsm_chunk_size=1m,lsm_merge_max=2,leaf_page_max=4k" + { "lsm:__wt", NULL, LSM_CONFIG }, + { "table:__wt", " [lsm]", "type=lsm," LSM_CONFIG }, + { NULL, NULL, NULL } }; u_int nthreads; int ch, cnt, runs; @@ -90,7 +93,8 @@ main(int argc, char *argv[]) for (cp = configs; cp->uri != NULL; ++cp) { uri = cp->uri; config = cp->config; - printf("%5d: %u threads on %s\n", cnt, nthreads, uri); + printf("%5d: %u threads on %s%s\n", cnt, nthreads, uri, + cp->desc == NULL ? "" : cp->desc); wt_startup(config_open); diff --git a/test/suite/test_base02.py b/test/suite/test_base02.py index 5862a41e6dd..67d656df0ae 100644 --- a/test/suite/test_base02.py +++ b/test/suite/test_base02.py @@ -35,14 +35,18 @@ import wiredtiger, wttest # Test configuration strings. class test_base02(wttest.WiredTigerTestCase): name = 'test_base02a' + extra_config = '' scenarios = [ ('file', dict(uri='file:')), - ('table', dict(uri='table:')) - ] + ('table', dict(uri='table:')), + ('lsm', dict(uri='lsm:')), + ('table-lsm', dict(uri='table:', extra_config=',type=lsm')), + ] def create_and_drop(self, confstr): name = self.uri + self.name + confstr += self.extra_config self.pr('create_and_drop: ' + name + ": " + confstr) self.session.create(name, confstr) self.session.drop(name, None) @@ -82,7 +86,7 @@ class test_base02(wttest.WiredTigerTestCase): conf_jsonstr = [ json.dumps({'columns' : ('key', 'value')}), json.dumps({ - "key_format" : "r", + "key_format" : "S", "value_format" : "5sHQ", "columns" : ("id", "country", "year", "population"), "colgroups" : ("cyear", "population"), diff --git a/test/suite/test_drop.py b/test/suite/test_drop.py index b431b84c28e..80ace1f74d5 100644 --- a/test/suite/test_drop.py +++ b/test/suite/test_drop.py @@ -33,16 +33,19 @@ from helper import confirm_does_not_exist, complex_populate, simple_populate # session level drop operation class test_drop(wttest.WiredTigerTestCase): name = 'test_drop' + extra_config = '' scenarios = [ ('file', dict(uri='file:')), - ('table', dict(uri='table:')) - ] + ('table', dict(uri='table:')), + #Not yet: drop failing with an open cursor needs handle locking + #('table-lsm', dict(uri='table:', extra_config=',type=lsm')), + ] # Populate an object, remove it and confirm it no longer exists. def drop(self, populate, with_cursor): uri = self.uri + self.name - populate(self, uri, 'key_format=S', 10) + populate(self, uri, 'key_format=S' + self.extra_config, 10) # Open cursors should cause failure. if with_cursor: |