Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP

Loading…

Store format code in the data dictionary #84

Closed
spetrunia opened this Issue · 1 comment

1 participant

@spetrunia
Collaborator

In the future we might want to change the way MyRocks encodes table/index data (for example, we may want to add 'restore data' in order to support index-only scans for some columns). Just making the change may require that the data is dumped and re-loaded during the upgrade. This is not acceptable.

There is a way to avoid requiring dump/reload:

  • Introduce format_code in the data dictionary now. Currently, format_code=0x1 always.
  • When we need to introduce a new storage format, it will use format_code=0x2. Old data will still have format_code=0x1 and will be readable. New tables/indexes will use format_code=0x2 and eventually will replace the old ones.
@spetrunia spetrunia self-assigned this
@spetrunia spetrunia added this to the high-pri milestone
@spetrunia
Collaborator

It seems this is already done. RDBSE_KEYDEF has:

    DDL_ENTRY_INDEX_VERSION= 1,
    INDEX_CF_MAPPING_VERSION= 1,
    CF_DEFINITION_VERSION= 1,
    BINLOG_INFO_INDEX_NUMBER_VERSION= 1,
    DDL_DROP_INDEX_ONGOING_VERSION= 1,
    // Version for index stats is stored in IndexStats struct

So, all records are versioned. When/if MyRocks needs another way to store data in an index (or table), one can use a value different than DDL_ENTRY_INDEX_VERSION for that index.

@spetrunia spetrunia closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.