Default "leaf_page_max=128KB" for cold collection data tables

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Engines - Server Integration
    • None
    • None

      Set the WiredTiger leaf_page_max to 128KB automatically when creating cold collection data tables (disaggregated=(storage_tier=cold)). Currently, cold collections use the WiredTiger default of 32KB, and the only way to set a different page size is via the user-facing configString parameter in createCollection. This change should be transparent so no user action required.

      See 128KB decision document for full analysis and rationale.

      The change should be in WiredTigerRecordStore::generateCreateString(). In generateCreateString(), after the existing prefix config and before extraCreateOptions is appended, detect if disaggregated=(storage_tier=cold) is present in extraCreateOptions and, if so, inject leaf_page_max=128KB into the prefix. Because extraCreateOptions is appended after, users can still override with an explicit leaf_page_max in their configString.

      Rough pseudocode for the change in generateCreateString():

      // In the prefix section (before extraCreateOptions):
      ss << "type=file,";
      ss << "memory_page_max=" << wtTableConfig.memoryPageMax << ",";
      ss << "split_pct=90,";
      ss << "leaf_value_max=64MB,"; 
      
      // NEW: default leaf page size for cold collections
      if (wtTableConfig.extraCreateOptions.find("storage_tier=cold") != std::string::npos) {
          ss << "leaf_page_max=128KB,";
      }
      
      ss << "checksum=on,";
      // ... rest of prefix ...
      ss << wtTableConfig.extraCreateOptions << ",";  // user config overrides prefix 

      Alternatively, the detection could happen in _createRecordStore() where extraCreateOptions is assembled, setting a flag on WiredTigerTableConfig like bool isColdCollection that generateCreateString() checks.

      Scope

      • Data tables only. Cold collection index tables are unaffected.
      • User override preserved. Because extraCreateOptions is appended after the prefix, an explicit leaf_page_max=X in the user's configString will override the 128KB default (WiredTiger last-value-wins).

      Acceptance Criteria

      • {{db.createCollection("x", {storageEngine: {wiredTiger: {configString: "disaggregated=(storage_tier=cold)"}

        }})}} creates a table with leaf_page_max=128KB without the user specifying it.

      • Non-cold collections are unaffected (remain at WT default 32KB).
      • Users can still override with an explicit leaf_page_max in configString.

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

              Created:
              Updated: