Skip to content

Commit

Permalink
Expose backup metadata getter in C API
Browse files Browse the repository at this point in the history
  • Loading branch information
agreen17 committed Jan 9, 2024
1 parent 334e4fb commit 9cc9d19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions db/c.cc
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,11 @@ uint32_t rocksdb_backup_engine_info_number_files(
return info->rep[index].number_files;
}

const char* rocksdb_backup_engine_info_metadata(
const rocksdb_backup_engine_info_t* info, int index) {
return info->rep[index].app_metadata.c_str();
}

void rocksdb_backup_engine_info_destroy(
const rocksdb_backup_engine_info_t* info) {
delete info;
Expand Down
3 changes: 3 additions & 0 deletions include/rocksdb/c.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ extern ROCKSDB_LIBRARY_API uint64_t rocksdb_backup_engine_info_size(
extern ROCKSDB_LIBRARY_API uint32_t rocksdb_backup_engine_info_number_files(
const rocksdb_backup_engine_info_t* info, int index);

extern ROCKSDB_LIBRARY_API const char* rocksdb_backup_engine_info_metadata(
const rocksdb_backup_engine_info_t* info, int index);

extern ROCKSDB_LIBRARY_API void rocksdb_backup_engine_info_destroy(
const rocksdb_backup_engine_info_t* info);

Expand Down

0 comments on commit 9cc9d19

Please sign in to comment.