We should add a timeout option to the wt compact command.
WT_SESSION::compact() has a configuration option to set the timeout for the compact operation. It defaults to 1200 seconds. This timeout cannot be set when running compact with the command line utility, wt compact. This means it is impossible to use that utility to compact large files that require more than 20 minutes to compact.
- Does this affect any team outside of WT?
No. It is unlikely that other teams are using the wt utility to run compaction.
Acceptance Criteria (Definition of Done)
The wt compact command should have an optional command line argument that lets the user set the timeout and passes that option to WT_SESSION::compact() via the timeout= config option.
Add a python test to make sure wt compact accepts different settings of the new timeout option. We currently exercise wt compact as part of test_compact01.py. So we could either expand that test or add a test_util* test that specifically targets this functionality. It probably isn't worth verifying that the timeout is correctly implemented as tests of timing tend to be fragile in these tests.
- Documentation update
The documentation for the wt utility should be updated to reflect the new option.
It seems to me that the simplest semantic would be to have wt compact default to having no timeout (i.e,. use the timout=0 config). Then the user can use the new option if they specifically want to limit the runtime.