diff --git a/db/c.cc b/db/c.cc index cd7342dcd257..6636adb9b1bb 100644 --- a/db/c.cc +++ b/db/c.cc @@ -706,6 +706,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; diff --git a/include/rocksdb/c.h b/include/rocksdb/c.h index 18c6b6f2af58..e1ab85a9c0e0 100644 --- a/include/rocksdb/c.h +++ b/include/rocksdb/c.h @@ -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);