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

Reduce complexity of timestamp usage assertion API code

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.0.0, 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 5
    • Storage - Ra 2022-02-21

      There are a number of timestamp usage assertion configurations that can be provided in the creation config of a table in WiredTiger.

      This includes but might not be limited to:

      • write_timestamp_usage
      • assert=(write_timestamp=on)
      • verbose=[write_timestamp]

      Currently if the user wants to restrict their timestamps it appears they would need to specify all three, when two at max or perhaps even only one should be required. This is because the code in one of the two relevant functions "__txn_commit_timestamps_usage_check" checks to see if verbose logging in enabled prior to triggering the assertion.

      The other relevant function is: __txn_commit_timestamps_assert which does some assertions but only appears to handle write_timestamp_usage=key_consistent and doesn't appear to handle the other cases for mixed_mode, ordered. Additionally this function is only called once per commit while the prior function is called per op.

      We should investigate whether the two functions can be combined, and also investigate removing the verbose logging check so that assertions contained in __txn_commit_timestamps_usage_check are still valid without verbose logging being enabled.

            keith.bostic@mongodb.com Keith Bostic (Inactive)
            luke.pearson@mongodb.com Luke Pearson
            0 Vote for this issue
            10 Start watching this issue