Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-40109

Materialized Views: REFRESH VIEW side (design + dev + review)

    XMLWordPrintable

Details

    Description

      Foundational ticket for MDEV-12163 — Materialized Views. Owns the new SQL surface, on-disk layout, version registry, and the REFRESH MATERIALIZED VIEW lifecycle.

      Scope (design + dev + code review together):

      • New SQL surface: CREATE MATERIALIZED VIEW, REFRESH MATERIALIZED VIEW, DROP MATERIALIZED VIEW (parser + .frm storage with the prefix#version scheme).
      • Storage: materialised data in an Aria non-transactional read-only table. Latest version's .frm stored as table_name.frm (rename on supersession to avoid glob-by-version directory scans — see Caveats in the Epic).
      • In-memory version registry (TABLE_SHARE-based) holding latest version number / timestamp.
      • REFRESH body: take MDL_SHARED_NO_WRITE, bump version, log prepare_drop in DDL log, create table_name#version, copy data, clean up old unused versions, unlock.
      • Concurrency: enforce no-concurrent-REFRESH.
      • DROP: MDL_EXCLUSIVE, wait for existing transactions to release, drop all versions.
      • New server variable for max stored versions / total view size (per Epic 'General approach').
      • Code-review iteration.

      Depends on: nothing (foundational).
      Blocks: the DML and Recovery sub-tickets.

      Estimate baseline: 25d core dev + 6d design + 3d code review = 34d distributed across REFRESH / DML / Recovery. This ticket: ~17d.

      Attachments

        Activity

          People

            shulga Dmitry Shulga
            julien.fritsch Julien Fritsch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 17d
                17d
                Remaining:
                Remaining Estimate - 17d
                17d
                Logged:
                Time Spent - Not Specified
                Not Specified

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.