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

Expose a C API for reading seq index SSTable files

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • Morpheus
    • Morpheus
    • storage-engine
    • None

    Description

      For continuous backup to be able to restore, and for getting some collection information at backup time; we will need to be able to read SSTable files. To do this a C API will need to be exposed which will then be consumed using CGo.

      This API will need to be opened up to a specific offset. It will also need to be able to get the current document, seek to the next and seek to a specific seqno. Below is a suggestion of the API

      typedef struct {
          char *data;
          ssize_t len;
      } buffer_t;
       
      error_code_t magma_sstabble_file_reader_open(const char *path, uint64_t offset);
       
      error_code_t magma_sstable_file_reader_seek(sstable_file_reader_t *rdr, uint48_t seqno);
      error_code_t magma_sstable_file_reader_next(sstable_file_reader_t *rdr);
       
      error_code_t magma_sstable_file_reader_get_doc(sstable_file_reader_t *rdr, buffer_t *key, buffer_t *meta, buffer_t *value, uint48_t *seqno);
      

      Attachments

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

        Activity

          People

            Matt.Hall Matt Hall
            Matt.Hall Matt Hall
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty