The WiredTiger command line utility has many sub-commands, for sub-commands that don't change the content of a database it's safer for the command itself to avoid changing the data. We have a flag that can be used to open a database in read-only mode. We should change the read-only command line utilities to open the database in read-only mode.
This was uncovered when attempting to write a script to automatically dump and verify test artifacts - which was failing on LSM, because a background merge. Details of the test failure follow:
With recent work of adding test to verify data file portability between little and big-endian platform (WT-4498), one table generated on the big-endian platform (x390/zSeries build variant) failed to be dumped on the little-endian platform (ubuntu build variant).
[2019/01/17 20:57:21.162] file:test_backup.4_cgroup2-000002.lsm [2019/01/17 20:57:21.162] wt: cursor open(file:test_backup.4_cgroup2-000002.lsm) failed: No such file or directory [2019/01/17 20:57:21.164] Failed to dump 'file:test_backup.4_cgroup2-000002.lsm' table under './.libs/WT_TEST/.libs/WT_TEST/test_backup03.test_backup_target.test_backup_target(backup_6b).0' directory, exiting ... [2019/01/17 20:57:21.166] ./test/evergreen/dump_wt_datafiles.sh 2>&1 [2019/01/17 20:57:21.166] Command failed: command [pid=2531] encountered problem: exit status 2 [2019/01/17 20:57:21.167] Task completed - FAILURE.