Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Done
-
WT2.8.0
-
None
-
None
Description
While debugging WT-2330, keith.bostic found the following bug in LSM:
With this change:
diff --git a/src/block/block_open.c b/src/block/block_open.c
|
index f4da5ca..eb42ddb 100644
|
--- a/src/block/block_open.c
|
+++ b/src/block/block_open.c
|
@@ -209,7 +209,7 @@ __wt_block_open(WT_SESSION_IMPL *session,
|
block->preload_available = true;
|
|
/* Open the underlying file handle. */
|
- WT_ERR(__wt_open(session, filename, WT_FILE_TYPE_DATA, 0, &block->fh));
|
+ WT_ERR(__wt_open(session, filename, WT_FILE_TYPE_DATA, readonly ? WT_OPEN_READONLY : 0, &block->fh));
|
|
/* Set the file's size. */
|
WT_ERR(__wt_filesize(session, block->fh, &block->size));
|
And this Python script:
#!/usr/bin/env python
|
|
import os
|
import wiredtiger, wttest
|
from suite_subprocess import suite_subprocess
|
from helper import simple_populate
|
|
class f(wttest.WiredTigerTestCase, suite_subprocess):
|
def test_dump(self):
|
dir='XXX'
|
uri = 'lsm:xxx'
|
simple_populate(self, uri, 'key_format=S', 100)
|
|
os.mkdir(dir)
|
self.runWt(['dump', uri], outfilename='dump.out')
|
|
self.runWt(['-h', dir, 'load', '-f', 'dump.out'])
|
self.runWt(['-h', dir, 'load', '-f', 'dump.out'])
|
|
if __name__ == '__main__':
|
wttest.run()
|
Running the Python script errors with:
[1459214811:933618][33847:0x803006400], file:xxx-000002.lsm,
|
WT_SESSION.checkpoint: xxx-000002.lsm: handle-truncate: ftruncate: Invalid argument
|