Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-10003

Create testutil API to coordinate flush_tier calls

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.1.0, 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None

      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.

            Assignee:
            donald.anderson@mongodb.com Donald Anderson
            Reporter:
            donald.anderson@mongodb.com Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: