Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-62245

Expose an API in Magma to turn continuous backup on for a KV store

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • Morpheus
    • Morpheus
    • storage-engine

    Description

      When a vBucket becomes/stops being active KV will be responsible for calling a Magma API provides which will inform it of this, e.g.:

      struct BackupFile {
          std::string name;
          uint64_t len;
          uint48_t low_seqno, high_seqno;
      };
       
      using MetadataWriterFn = std::function<void(std::string&)>;
      using ContinuousBackupCb = std::function<void(KVStoreID kv_id, Magma::Snapshot& snapshot, std::vector<BackupFile>& new_files, MetadataWriterFn writer_fn)>;
       
      void Magma::StartBackup(KVStoreID kv_id, const std:string& cont_bk_path, ContinuousBackupCb cb);
      void Magma::StopBackup(KVStoreID kv_id);
      

      When StartBackup is called Magma should hard link all existing seqno index files to cont_bk_path and call the provided callback with the files that were linked. Every continuous backup interval further files should be hard linked and the callback invoked again. This should continue until StopBackup is called.

      When MetadataWriterFn is called it should serialise the string to a new file metadata.<n>.dat in the continuous backup location, where <n> is a monotonically increasing integer.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            apaar.gupta Apaar Gupta
            Matt.Hall Matt Hall
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty