Details
-
Improvement
-
Resolution: Fixed
-
Major
-
Morpheus
-
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
For Gerrit Dashboard: MB-62243 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
213476,13 | MB-62243 Expose C API for SSTable iterator | master | magma | Status: MERGED | +2 | +1 |