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

Utilise schema_worker function in partial backup restore

    • Storage Engines
    • 5
    • StorEng - Defined Pipeline

      Motivation

      From the WT-8703 ticket, inside partial backup restore, we have a step that needs to convert all table metadata entries into it's file metadata entry. The reason behind this step is to grab the btree id from the metadata file. 

              for (slot = 0; partial_backup_names[slot] != NULL; ++slot) {
                  tablename = partial_backup_names[slot];
                  WT_PREFIX_SKIP_REQUIRED(session, tablename, "table:");
                  WT_ERR(__wt_snprintf(filename, file_len, "file:%s.wt", tablename));
                  WT_ERR(__wt_metadata_search(session, filename, &metadata_conf));
                  WT_ERR(__wt_config_getones(session, metadata_conf, "id", &cval));
                  conn->partial_backup_remove_ids[slot] = (uint32_t)cval.val;
      
                  WT_WITH_SCHEMA_LOCK(session,
                    WT_WITH_TABLE_WRITE_LOCK(
                      session, ret = __wt_schema_drop(session, partial_backup_names[slot], drop_cfg)));
                  WT_ERR(ret);
              }
      

      There is a schema_worker function which main benefit parses through all the possible branches of schema formats and file formats from a table format. This ticket involves finding a method to utilise the schema_worker function to simplify this code here.

      Acceptance Criteria (Definition of Done)
      The definition of done in this ticket, is to successfully utilise the schema_worker function to achieve the same results. 

       

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            jie.chen@mongodb.com Jie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: