Handle schema operations before setting the stable schema epoch

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Metadata, Schema Management
    • None
    • Storage Engines - Foundations
    • 68.546
    • None
    • 5

      The current API requires that the caller sets the stable schema epoch before creating the first table, so that the table can be created correctly in the WT_BTREE_AWAITS_PUBLISH state. Otherwise, tables created before setting the stable epoch are created without this state, which allows WiredTiger to write empty root pages for them even before they are published.

      There are two ways in which we can handle this problem:

      1. Create all disaggregated tables with WT_BTREE_AWAITS_PUBLISH and publish them automatically during the next checkpoint, if the stable schema has not been set.
      2. Detect bad API usage, i.e., if a table was created before setting the stable schema epoch, and either warn or panic.

      The first solution would be arguably preferable, unless we foresee clients that don't plan to use the schema epoch / publish API with disaggregated but then also plan to bulk-load tables before their first checkpoint, which would result in the data not being evictable until the table gets implicitly published during its first checkpoint.

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Peter Macko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: