summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/suite/test_txn02.py
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2017-03-02 13:34:29 +1100
committerAlex Gorrod <alexander.gorrod@mongodb.com>2017-03-02 13:40:59 +1100
commit086c21e2b4c87952273fde78ab8fb18f18e8fdc6 (patch)
tree23f231369745a7d2e724f6db1ad4473a85db36aa /src/third_party/wiredtiger/test/suite/test_txn02.py
parente73cfbddea6d3f5c1499f93878679a768aa97dff (diff)
downloadmongo-086c21e2b4c87952273fde78ab8fb18f18e8fdc6.tar.gz
Import wiredtiger: d6659de8d742b9562d08c1ba5138be881f8e24fa from branch mongodb-3.4
ref: 8d23249433..d6659de8d7 for: 3.4.3 SERVER-16796 Increase logging activity for journal recovery operations WT-2402 Misaligned structure accesses lead to undefined behavior WT-2771 Add a statistic to track per-btree dirty cache usage WT-2790 Fix a text case false positive in test_sweep01 WT-2833 improvement: add projections to wt dump utility WT-2898 Improve performance of eviction-heavy workloads by dynamically controlling the number of eviction threads WT-2909 Create automatable test verifying checkpoint integrity after errors WT-2994 Create documentation describing page sizes and relationships WT-3080 Python test suite: add timestamp or elapsed time for tests WT-3082 Python test suite: shorten default run to avoid pull request timeouts. WT-3083 Fix a bug in wtperf config dump WT-3086 Add transaction state information to cache stuck diagnostic information WT-3088 bug: Don't evict a page with refs visible to readers after a split WT-3091 Add stats to test_perf0001 WT-3092 Quiet a warning from autogen.sh WT-3093 Padding the WT_RWLOCK structure grew the WT_PAGE structure. WT-3097 Race on reconfigure or shutdown can lead to waiting for statistics log server WT-3099 lint: static function declarations, non-text characters in documentation WT-3100 test bug: format is weighted to delete, insert, then write operations. WT-3104 Fix wtperf configs for eviction tests WT-3105 Fix a deadlock caused by allocating eviction thread sessions dynamically WT-3106 Add truncate support to command line wt utility WT-3108 Also dump disk page size as part of metadata information WT-3109 wording fix in transaction doc WT-3110 Add more test cases for the WT command line utility WT-3111 util_create() doesnt free memory assigned to "uri" WT-3112 Handle list lock statistic not incremented in eviction server WT-3113 Add a verbose mode to dump the cache when eviction is stuck WT-3114 Avoid archiving log files immediately after recovery WT-3115 Change the dhandle lock to a read/write lock WT-3116 Python style testing in s_all may not execute correctly WT-3118 Protect random-abort test against unexpectedly slow child start WT-3120 Fix ordering problem in connection_close for filesystem loaded in an extension WT-3121 In test suite create standard way to load extensions WT-3126 Fix a bug in dist/s_all script WT-3127 bug: CPU yield calls don't necessarily imply memory barriers WT-3128 Fix a bug where wt printlog returns operation-not-supported if it doesn't find any log files WT-3130 Proposal to change initialization of custom filesystem WT-3134 Coverity scan reports 1368529 and 1368528 WT-3135 search_near() for index with custom collator WT-3137 Hang in __log_slot_join/__log_slot_switch_internal WT-3139 Enhance wtperf to support periodic table scans WT-3143 Fix Coverity static analysis complaint in test program WT-3144 bug fix: random cursor returns not-found when descending to an empty page WT-3148 Improve eviction efficiency with many small trees WT-3149 Change eviction to start new walks from a random place in the tree WT-3150 Reduce impact of checkpoints on eviction server WT-3152 Convert table lock from a spinlock to a read write lock WT-3156 Assertion in log_write fires after write failure WT-3157 checkpoint/transaction integrity issue when writes fail. WT-3159 Incorrect key for index containing multiple variable sized entries WT-3161 checkpoint hang after write failure injection. WT-3164 Ensure all relevant btree fields are reset on checkpoint error WT-3170 Clear the eviction walk point while populating from a tree WT-3173 Add runtime detection for s390x CRC32 hardware support WT-3174 Coverity/lint cleanup WT-3175 New hang in internal page split WT-3179 test bug: clang sanitizer failure in fail_fs WT-3180 fault injection tests should only run as "long" tests and should not create core files WT-3184 Problem duplicating index cursor with custom collator WT-3186 Fix error path and panic detection in logging loops WT-3187 Hang on shutdown with a busy cache pool WT-3188 Fix error handling in logging where fatal errors could lead to a hang WT-3189 Fix a segfault in the eviction server random positioning
Diffstat (limited to 'src/third_party/wiredtiger/test/suite/test_txn02.py')
-rw-r--r--src/third_party/wiredtiger/test/suite/test_txn02.py26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/third_party/wiredtiger/test/suite/test_txn02.py b/src/third_party/wiredtiger/test/suite/test_txn02.py
index a0c2c12a47c..01626057b9e 100644
--- a/src/third_party/wiredtiger/test/suite/test_txn02.py
+++ b/src/third_party/wiredtiger/test/suite/test_txn02.py
@@ -93,11 +93,10 @@ class test_txn02(wttest.WiredTigerTestCase, suite_subprocess):
checklog_calls = 100 if wttest.islongtest() else 2
checklog_mod = (len(scenarios) / checklog_calls + 1)
- def setUpConnectionOpen(self, dir):
- self.home = dir
+ def conn_config(self):
# Cycle through the different transaction_sync values in a
# deterministic manner.
- self.txn_sync = self.sync_list[
+ txn_sync = self.sync_list[
self.scenario_number % len(self.sync_list)]
#
# We don't want to run zero fill with only the same settings, such
@@ -107,17 +106,9 @@ class test_txn02(wttest.WiredTigerTestCase, suite_subprocess):
zerofill = 'false'
if self.scenario_number % freq == 0:
zerofill = 'true'
- self.backup_dir = os.path.join(self.home, "WT_BACKUP")
- conn_params = \
- 'log=(archive=false,enabled,file_max=%s),' % self.logmax + \
- 'log=(zero_fill=%s),' % zerofill + \
- 'create,error_prefix="%s: ",' % self.shortid() + \
- 'transaction_sync="%s",' % self.txn_sync
- # print "Creating conn at '%s' with config '%s'" % (dir, conn_params)
- conn = self.wiredtiger_open(dir, conn_params)
- self.pr(`conn`)
- self.session2 = conn.open_session()
- return conn
+ return 'log=(archive=false,enabled,file_max=%s),' % self.logmax + \
+ 'log=(zero_fill=%s),' % zerofill + \
+ 'transaction_sync="%s",' % txn_sync
# Check that a cursor (optionally started in a new transaction), sees the
# expected values.
@@ -176,8 +167,10 @@ class test_txn02(wttest.WiredTigerTestCase, suite_subprocess):
backup_conn = self.wiredtiger_open(self.backup_dir,
backup_conn_params)
try:
- self.check(backup_conn.open_session(), None, committed)
+ session = backup_conn.open_session()
finally:
+ session.checkpoint("force")
+ self.check(backup_conn.open_session(), None, committed)
# Sleep long enough so that the archive thread is guaranteed
# to run before we close the connection.
time.sleep(1.0)
@@ -204,6 +197,8 @@ class test_txn02(wttest.WiredTigerTestCase, suite_subprocess):
self.assertEqual(cur_logs, pr_logs)
def test_ops(self):
+ self.backup_dir = os.path.join(self.home, "WT_BACKUP")
+ self.session2 = self.conn.open_session()
# print "Creating %s with config '%s'" % (self.uri, self.create_params)
self.session.create(self.uri, self.create_params)
# Set up the table with entries for 1, 2, 10 and 11.
@@ -226,6 +221,7 @@ class test_txn02(wttest.WiredTigerTestCase, suite_subprocess):
# Close and reopen the connection and cursor.
if reopen == 'reopen':
self.reopen_conn()
+ self.session2 = self.conn.open_session()
c = self.session.open_cursor(self.uri, None, 'overwrite')
self.session.begin_transaction(