Skip to content

Commit

Permalink
add api rocksdb_sst_file_metadata_get_file_create_time
Browse files Browse the repository at this point in the history
  • Loading branch information
VCgege committed Dec 5, 2024
1 parent c24ff3f commit 3c04f48
Show file tree
Hide file tree
Showing 2 changed files with 13 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 @@ -5834,6 +5834,11 @@ char* rocksdb_sst_file_metadata_get_largestkey(
return CopyString(file_meta->rep->largestkey);
}

uint64_t rocksdb_sst_file_metadata_get_file_creation_time(
rocksdb_sst_file_metadata_t* file_meta) {
return file_meta->rep->file_creation_time;
}

/* Transactions */

rocksdb_transactiondb_options_t* rocksdb_transactiondb_options_create() {
Expand Down
8 changes: 8 additions & 0 deletions include/rocksdb/c.h
Original file line number Diff line number Diff line change
Expand Up @@ -2604,6 +2604,14 @@ extern ROCKSDB_LIBRARY_API char* rocksdb_sst_file_metadata_get_smallestkey(
extern ROCKSDB_LIBRARY_API char* rocksdb_sst_file_metadata_get_largestkey(
rocksdb_sst_file_metadata_t* file_meta, size_t* len);

/**
* Returns the create time of the specified sst file.
*
* @param file_meta the metadata of an SST file to obtain its create time.
*/
extern ROCKSDB_LIBRARY_API uint64_t rocksdb_sst_file_metadata_get_file_creation_time(
rocksdb_sst_file_metadata_t* file_meta);

/* Transactions */

extern ROCKSDB_LIBRARY_API rocksdb_column_family_handle_t*
Expand Down

0 comments on commit 3c04f48

Please sign in to comment.