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

Support the compact API that retains the stale data up to a given file-level snapshot marker.

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • feature-backlog
    • feature-backlog
    • forestdb
    • Security Level: Public
    • None
    • ForestDB: Oct 26 - Nov 13

    Description

      In some cases, an application wants to retain the stale data up to a given snapshot marker that corresponds to one of the commit headers in a database file. For this, the following new APIs should be provided:

      typedef struct

      { fdb_seqnum_t seqnum; // committed sequence number for a given KV store. const char *kv_store_name; // NULL-terminated KV store name }

      fdb_kvs_commit_marker_t;

      /*

      • fdb_snapshot_marker_t is an opaque file-level snapshot marker that can be used to purge the stale data up to a given snapshot marker.
        */
        typedef struct
        Unknown macro: { fdb_snapshot_marker_t marker; // opaque file-level snapshot marker uint64_t num_kvs_markers; // number of elements in the array below fdb_kvs_commit_marker_t *kvs_markers; // pointer to an array of {seqnum, kv_store_name} pairs }

        ;
        } fdb_snapshot_info_t;

      /**

      • Return all the snapshot markers in a given database file.
        */
        fdb_status fdb_get_all_snap_markers(fdb_file_handle *fhandle, fdb_snapshot_info_t **markers, int *size);

      /**

      • Compact the database file by retaining the stale data up to a given file-level snapshot marker.
        */
        fdb_status fdb_compact_upto(fdb_file_handle *fhandle,
        const char *new_filename,
        fdb_snapshot_marker_t marker);

      Attachments

        For Gerrit Dashboard: MB-12542
        # Subject Branch Project Status CR V

        Activity

          People

            sundar Sundar Sridharan (Inactive)
            chiyoung Chiyoung Seo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty