Various test programs have different code to do checkpoint loops in a separate thread. Now that flush_tier is part of the checkpoint call it's clear we need a way to coordinate flush_tier calls within each custom loop with what testutil knows: how often to do a checkpoint, and whether to apply an "accept_tier" call. The APIs could look something like:
int testutil_sleep(TEST_OPTS *, WT_SESSION *, int seconds, bool *do_flush_tier); int testutil_flush_complete(TEST_OPTS *, WT_SESSION *);
In testutil_sleep, passing a non-NULL for do_flush_tier, says this thread is interested in doing a flush_tier. The thread sleeps for the given amount of time (as long as the program is running), and as long as a flush_tier shouldn't be done (if the do_flush_tier is non-NULL). The TEST_OPTS struct should also have a "running" boolean that is initialized as true, and is set to false when the program wants to exit.
The test program tells testutil that the flush is complete by calling testutil_flush_complete. That can be called after the checkpoint/flush_tier is completed, or it can be caught by the general event handler and passed along.
- is depended on by
-
WT-10033 schema_abort : Move checkpoint/flush_tier calls to test_util
- Closed