clang format files under include/ (#10850)

Summary:
Run clang-format against files under include/

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10850

Test Plan: Watch existing CI to pass.

Reviewed By: ajkr

Differential Revision: D40646158

fbshipit-source-id: 8ce04b107c837630f4000a478d0c871577090263
main
sdong 2 years ago committed by Facebook GitHub Bot
parent deb6a24be2
commit b0d9776b70
  1. 263
      include/rocksdb/c.h
  2. 1
      include/rocksdb/compaction_job_stats.h
  3. 1
      include/rocksdb/db.h
  4. 18
      include/rocksdb/file_system.h
  5. 2
      include/rocksdb/io_status.h
  6. 1
      include/rocksdb/iostats_context.h
  7. 1
      include/rocksdb/ldb_tool.h
  8. 1
      include/rocksdb/perf_context.h
  9. 1
      include/rocksdb/perf_level.h
  10. 1
      include/rocksdb/persistent_cache.h
  11. 1
      include/rocksdb/transaction_log.h
  12. 1
      include/rocksdb/types.h
  13. 1
      include/rocksdb/utilities/checkpoint.h
  14. 1
      include/rocksdb/utilities/env_mirror.h
  15. 1
      include/rocksdb/utilities/option_change_migration.h
  16. 8
      include/rocksdb/utilities/options_type.h
  17. 2
      include/rocksdb/utilities/sim_cache.h
  18. 8
      include/rocksdb/utilities/stackable_db.h

@ -85,7 +85,8 @@ typedef struct rocksdb_compactionfilterfactory_t
typedef struct rocksdb_comparator_t rocksdb_comparator_t;
typedef struct rocksdb_dbpath_t rocksdb_dbpath_t;
typedef struct rocksdb_env_t rocksdb_env_t;
typedef struct rocksdb_fifo_compaction_options_t rocksdb_fifo_compaction_options_t;
typedef struct rocksdb_fifo_compaction_options_t
rocksdb_fifo_compaction_options_t;
typedef struct rocksdb_filelock_t rocksdb_filelock_t;
typedef struct rocksdb_filterpolicy_t rocksdb_filterpolicy_t;
typedef struct rocksdb_flushoptions_t rocksdb_flushoptions_t;
@ -96,8 +97,7 @@ typedef struct rocksdb_options_t rocksdb_options_t;
typedef struct rocksdb_compactoptions_t rocksdb_compactoptions_t;
typedef struct rocksdb_block_based_table_options_t
rocksdb_block_based_table_options_t;
typedef struct rocksdb_cuckoo_table_options_t
rocksdb_cuckoo_table_options_t;
typedef struct rocksdb_cuckoo_table_options_t rocksdb_cuckoo_table_options_t;
typedef struct rocksdb_randomfile_t rocksdb_randomfile_t;
typedef struct rocksdb_readoptions_t rocksdb_readoptions_t;
typedef struct rocksdb_seqfile_t rocksdb_seqfile_t;
@ -107,7 +107,8 @@ typedef struct rocksdb_writablefile_t rocksdb_writablefile_t;
typedef struct rocksdb_writebatch_t rocksdb_writebatch_t;
typedef struct rocksdb_writebatch_wi_t rocksdb_writebatch_wi_t;
typedef struct rocksdb_writeoptions_t rocksdb_writeoptions_t;
typedef struct rocksdb_universal_compaction_options_t rocksdb_universal_compaction_options_t;
typedef struct rocksdb_universal_compaction_options_t
rocksdb_universal_compaction_options_t;
typedef struct rocksdb_livefiles_t rocksdb_livefiles_t;
typedef struct rocksdb_column_family_handle_t rocksdb_column_family_handle_t;
typedef struct rocksdb_column_family_metadata_t
@ -115,7 +116,8 @@ typedef struct rocksdb_column_family_metadata_t
typedef struct rocksdb_level_metadata_t rocksdb_level_metadata_t;
typedef struct rocksdb_sst_file_metadata_t rocksdb_sst_file_metadata_t;
typedef struct rocksdb_envoptions_t rocksdb_envoptions_t;
typedef struct rocksdb_ingestexternalfileoptions_t rocksdb_ingestexternalfileoptions_t;
typedef struct rocksdb_ingestexternalfileoptions_t
rocksdb_ingestexternalfileoptions_t;
typedef struct rocksdb_sstfilewriter_t rocksdb_sstfilewriter_t;
typedef struct rocksdb_ratelimiter_t rocksdb_ratelimiter_t;
typedef struct rocksdb_perfcontext_t rocksdb_perfcontext_t;
@ -161,8 +163,8 @@ extern ROCKSDB_LIBRARY_API void rocksdb_backup_engine_create_new_backup(
rocksdb_backup_engine_t* be, rocksdb_t* db, char** errptr);
extern ROCKSDB_LIBRARY_API void rocksdb_backup_engine_create_new_backup_flush(
rocksdb_backup_engine_t* be, rocksdb_t* db, unsigned char flush_before_backup,
char** errptr);
rocksdb_backup_engine_t* be, rocksdb_t* db,
unsigned char flush_before_backup, char** errptr);
extern ROCKSDB_LIBRARY_API void rocksdb_backup_engine_purge_old_backups(
rocksdb_backup_engine_t* be, uint32_t num_backups_to_keep, char** errptr);
@ -174,9 +176,8 @@ extern ROCKSDB_LIBRARY_API void rocksdb_restore_options_destroy(
extern ROCKSDB_LIBRARY_API void rocksdb_restore_options_set_keep_log_files(
rocksdb_restore_options_t* opt, int v);
extern ROCKSDB_LIBRARY_API void
rocksdb_backup_engine_verify_backup(rocksdb_backup_engine_t* be,
uint32_t backup_id, char** errptr);
extern ROCKSDB_LIBRARY_API void rocksdb_backup_engine_verify_backup(
rocksdb_backup_engine_t* be, uint32_t backup_id, char** errptr);
extern ROCKSDB_LIBRARY_API void
rocksdb_backup_engine_restore_db_from_latest_backup(
@ -194,17 +195,14 @@ rocksdb_backup_engine_get_backup_info(rocksdb_backup_engine_t* be);
extern ROCKSDB_LIBRARY_API int rocksdb_backup_engine_info_count(
const rocksdb_backup_engine_info_t* info);
extern ROCKSDB_LIBRARY_API int64_t
rocksdb_backup_engine_info_timestamp(const rocksdb_backup_engine_info_t* info,
int index);
extern ROCKSDB_LIBRARY_API int64_t rocksdb_backup_engine_info_timestamp(
const rocksdb_backup_engine_info_t* info, int index);
extern ROCKSDB_LIBRARY_API uint32_t
rocksdb_backup_engine_info_backup_id(const rocksdb_backup_engine_info_t* info,
int index);
extern ROCKSDB_LIBRARY_API uint32_t rocksdb_backup_engine_info_backup_id(
const rocksdb_backup_engine_info_t* info, int index);
extern ROCKSDB_LIBRARY_API uint64_t
rocksdb_backup_engine_info_size(const rocksdb_backup_engine_info_t* info,
int index);
extern ROCKSDB_LIBRARY_API uint64_t rocksdb_backup_engine_info_size(
const rocksdb_backup_engine_info_t* info, int index);
extern ROCKSDB_LIBRARY_API uint32_t rocksdb_backup_engine_info_number_files(
const rocksdb_backup_engine_info_t* info, int index);
@ -577,16 +575,14 @@ extern ROCKSDB_LIBRARY_API rocksdb_iterator_t* rocksdb_create_iterator(
extern ROCKSDB_LIBRARY_API rocksdb_wal_iterator_t* rocksdb_get_updates_since(
rocksdb_t* db, uint64_t seq_number,
const rocksdb_wal_readoptions_t* options,
char** errptr
);
const rocksdb_wal_readoptions_t* options, char** errptr);
extern ROCKSDB_LIBRARY_API rocksdb_iterator_t* rocksdb_create_iterator_cf(
rocksdb_t* db, const rocksdb_readoptions_t* options,
rocksdb_column_family_handle_t* column_family);
extern ROCKSDB_LIBRARY_API void rocksdb_create_iterators(
rocksdb_t *db, rocksdb_readoptions_t* opts,
rocksdb_t* db, rocksdb_readoptions_t* opts,
rocksdb_column_family_handle_t** column_families,
rocksdb_iterator_t** iterators, size_t size, char** errptr);
@ -601,14 +597,13 @@ extern ROCKSDB_LIBRARY_API void rocksdb_release_snapshot(
extern ROCKSDB_LIBRARY_API char* rocksdb_property_value(rocksdb_t* db,
const char* propname);
/* returns 0 on success, -1 otherwise */
int rocksdb_property_int(
rocksdb_t* db,
const char* propname, uint64_t *out_val);
int rocksdb_property_int(rocksdb_t* db, const char* propname,
uint64_t* out_val);
/* returns 0 on success, -1 otherwise */
int rocksdb_property_int_cf(
rocksdb_t* db, rocksdb_column_family_handle_t* column_family,
const char* propname, uint64_t *out_val);
int rocksdb_property_int_cf(rocksdb_t* db,
rocksdb_column_family_handle_t* column_family,
const char* propname, uint64_t* out_val);
extern ROCKSDB_LIBRARY_API char* rocksdb_property_value_cf(
rocksdb_t* db, rocksdb_column_family_handle_t* column_family,
@ -708,13 +703,18 @@ extern ROCKSDB_LIBRARY_API const char* rocksdb_iter_timestamp(
extern ROCKSDB_LIBRARY_API void rocksdb_iter_get_error(
const rocksdb_iterator_t*, char** errptr);
extern ROCKSDB_LIBRARY_API void rocksdb_wal_iter_next(rocksdb_wal_iterator_t* iter);
extern ROCKSDB_LIBRARY_API void rocksdb_wal_iter_next(
rocksdb_wal_iterator_t* iter);
extern ROCKSDB_LIBRARY_API unsigned char rocksdb_wal_iter_valid(
const rocksdb_wal_iterator_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_wal_iter_status (const rocksdb_wal_iterator_t* iter, char** errptr) ;
extern ROCKSDB_LIBRARY_API rocksdb_writebatch_t* rocksdb_wal_iter_get_batch (const rocksdb_wal_iterator_t* iter, uint64_t* seq) ;
extern ROCKSDB_LIBRARY_API uint64_t rocksdb_get_latest_sequence_number (rocksdb_t *db);
extern ROCKSDB_LIBRARY_API void rocksdb_wal_iter_destroy (const rocksdb_wal_iterator_t* iter) ;
extern ROCKSDB_LIBRARY_API void rocksdb_wal_iter_status(
const rocksdb_wal_iterator_t* iter, char** errptr);
extern ROCKSDB_LIBRARY_API rocksdb_writebatch_t* rocksdb_wal_iter_get_batch(
const rocksdb_wal_iterator_t* iter, uint64_t* seq);
extern ROCKSDB_LIBRARY_API uint64_t
rocksdb_get_latest_sequence_number(rocksdb_t* db);
extern ROCKSDB_LIBRARY_API void rocksdb_wal_iter_destroy(
const rocksdb_wal_iterator_t* iter);
/* Write batch */
@ -820,19 +820,19 @@ extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_pop_save_point(
/* Write batch with index */
extern ROCKSDB_LIBRARY_API rocksdb_writebatch_wi_t* rocksdb_writebatch_wi_create(
size_t reserved_bytes,
extern ROCKSDB_LIBRARY_API rocksdb_writebatch_wi_t*
rocksdb_writebatch_wi_create(size_t reserved_bytes,
unsigned char overwrite_keys);
extern ROCKSDB_LIBRARY_API rocksdb_writebatch_wi_t* rocksdb_writebatch_wi_create_from(
const char* rep, size_t size);
extern ROCKSDB_LIBRARY_API rocksdb_writebatch_wi_t*
rocksdb_writebatch_wi_create_from(const char* rep, size_t size);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_destroy(
rocksdb_writebatch_wi_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_clear(rocksdb_writebatch_wi_t*);
extern ROCKSDB_LIBRARY_API int rocksdb_writebatch_wi_count(rocksdb_writebatch_wi_t* b);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_put(rocksdb_writebatch_wi_t*,
const char* key,
size_t klen,
const char* val,
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_clear(
rocksdb_writebatch_wi_t*);
extern ROCKSDB_LIBRARY_API int rocksdb_writebatch_wi_count(
rocksdb_writebatch_wi_t* b);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_put(
rocksdb_writebatch_wi_t*, const char* key, size_t klen, const char* val,
size_t vlen);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_put_cf(
rocksdb_writebatch_wi_t*, rocksdb_column_family_handle_t* column_family,
@ -846,10 +846,8 @@ extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_putv_cf(
int num_keys, const char* const* keys_list, const size_t* keys_list_sizes,
int num_values, const char* const* values_list,
const size_t* values_list_sizes);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_merge(rocksdb_writebatch_wi_t*,
const char* key,
size_t klen,
const char* val,
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_merge(
rocksdb_writebatch_wi_t*, const char* key, size_t klen, const char* val,
size_t vlen);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_merge_cf(
rocksdb_writebatch_wi_t*, rocksdb_column_family_handle_t* column_family,
@ -863,9 +861,8 @@ extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_mergev_cf(
int num_keys, const char* const* keys_list, const size_t* keys_list_sizes,
int num_values, const char* const* values_list,
const size_t* values_list_sizes);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_delete(rocksdb_writebatch_wi_t*,
const char* key,
size_t klen);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_delete(
rocksdb_writebatch_wi_t*, const char* key, size_t klen);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_singledelete(
rocksdb_writebatch_wi_t*, const char* key, size_t klen);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_delete_cf(
@ -891,9 +888,9 @@ extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_delete_range_cf(
size_t end_key_len);
// DO NOT USE - rocksdb_writebatch_wi_delete_rangev is not yet supported
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_delete_rangev(
rocksdb_writebatch_wi_t* b, int num_keys, const char* const* start_keys_list,
const size_t* start_keys_list_sizes, const char* const* end_keys_list,
const size_t* end_keys_list_sizes);
rocksdb_writebatch_wi_t* b, int num_keys,
const char* const* start_keys_list, const size_t* start_keys_list_sizes,
const char* const* end_keys_list, const size_t* end_keys_list_sizes);
// DO NOT USE - rocksdb_writebatch_wi_delete_rangev_cf is not yet supported
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_delete_rangev_cf(
rocksdb_writebatch_wi_t* b, rocksdb_column_family_handle_t* column_family,
@ -903,56 +900,40 @@ extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_delete_rangev_cf(
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_put_log_data(
rocksdb_writebatch_wi_t*, const char* blob, size_t len);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_iterate(
rocksdb_writebatch_wi_t* b,
void* state,
rocksdb_writebatch_wi_t* b, void* state,
void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen),
void (*deleted)(void*, const char* k, size_t klen));
extern ROCKSDB_LIBRARY_API const char* rocksdb_writebatch_wi_data(
rocksdb_writebatch_wi_t* b,
size_t* size);
rocksdb_writebatch_wi_t* b, size_t* size);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_set_save_point(
rocksdb_writebatch_wi_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_writebatch_wi_rollback_to_save_point(
rocksdb_writebatch_wi_t*, char** errptr);
extern ROCKSDB_LIBRARY_API char* rocksdb_writebatch_wi_get_from_batch(
rocksdb_writebatch_wi_t* wbwi,
const rocksdb_options_t* options,
const char* key, size_t keylen,
size_t* vallen,
char** errptr);
rocksdb_writebatch_wi_t* wbwi, const rocksdb_options_t* options,
const char* key, size_t keylen, size_t* vallen, char** errptr);
extern ROCKSDB_LIBRARY_API char* rocksdb_writebatch_wi_get_from_batch_cf(
rocksdb_writebatch_wi_t* wbwi,
const rocksdb_options_t* options,
rocksdb_column_family_handle_t* column_family,
const char* key, size_t keylen,
size_t* vallen,
char** errptr);
rocksdb_writebatch_wi_t* wbwi, const rocksdb_options_t* options,
rocksdb_column_family_handle_t* column_family, const char* key,
size_t keylen, size_t* vallen, char** errptr);
extern ROCKSDB_LIBRARY_API char* rocksdb_writebatch_wi_get_from_batch_and_db(
rocksdb_writebatch_wi_t* wbwi,
rocksdb_t* db,
const rocksdb_readoptions_t* options,
const char* key, size_t keylen,
size_t* vallen,
char** errptr);
rocksdb_writebatch_wi_t* wbwi, rocksdb_t* db,
const rocksdb_readoptions_t* options, const char* key, size_t keylen,
size_t* vallen, char** errptr);
extern ROCKSDB_LIBRARY_API char* rocksdb_writebatch_wi_get_from_batch_and_db_cf(
rocksdb_writebatch_wi_t* wbwi,
rocksdb_t* db,
rocksdb_writebatch_wi_t* wbwi, rocksdb_t* db,
const rocksdb_readoptions_t* options,
rocksdb_column_family_handle_t* column_family,
const char* key, size_t keylen,
size_t* vallen,
char** errptr);
rocksdb_column_family_handle_t* column_family, const char* key,
size_t keylen, size_t* vallen, char** errptr);
extern ROCKSDB_LIBRARY_API void rocksdb_write_writebatch_wi(
rocksdb_t* db,
const rocksdb_writeoptions_t* options,
rocksdb_writebatch_wi_t* wbwi,
char** errptr);
extern ROCKSDB_LIBRARY_API rocksdb_iterator_t* rocksdb_writebatch_wi_create_iterator_with_base(
rocksdb_writebatch_wi_t* wbwi,
rocksdb_iterator_t* base_iterator);
extern ROCKSDB_LIBRARY_API rocksdb_iterator_t* rocksdb_writebatch_wi_create_iterator_with_base_cf(
rocksdb_writebatch_wi_t* wbwi,
rocksdb_iterator_t* base_iterator,
rocksdb_t* db, const rocksdb_writeoptions_t* options,
rocksdb_writebatch_wi_t* wbwi, char** errptr);
extern ROCKSDB_LIBRARY_API rocksdb_iterator_t*
rocksdb_writebatch_wi_create_iterator_with_base(
rocksdb_writebatch_wi_t* wbwi, rocksdb_iterator_t* base_iterator);
extern ROCKSDB_LIBRARY_API rocksdb_iterator_t*
rocksdb_writebatch_wi_create_iterator_with_base_cf(
rocksdb_writebatch_wi_t* wbwi, rocksdb_iterator_t* base_iterator,
rocksdb_column_family_handle_t* cf);
/* Options utils */
@ -995,16 +976,19 @@ rocksdb_block_based_options_set_block_restart_interval(
rocksdb_block_based_table_options_t* options, int block_restart_interval);
extern ROCKSDB_LIBRARY_API void
rocksdb_block_based_options_set_index_block_restart_interval(
rocksdb_block_based_table_options_t* options, int index_block_restart_interval);
rocksdb_block_based_table_options_t* options,
int index_block_restart_interval);
extern ROCKSDB_LIBRARY_API void
rocksdb_block_based_options_set_metadata_block_size(
rocksdb_block_based_table_options_t* options, uint64_t metadata_block_size);
extern ROCKSDB_LIBRARY_API void
rocksdb_block_based_options_set_partition_filters(
rocksdb_block_based_table_options_t* options, unsigned char partition_filters);
rocksdb_block_based_table_options_t* options,
unsigned char partition_filters);
extern ROCKSDB_LIBRARY_API void
rocksdb_block_based_options_set_use_delta_encoding(
rocksdb_block_based_table_options_t* options, unsigned char use_delta_encoding);
rocksdb_block_based_table_options_t* options,
unsigned char use_delta_encoding);
extern ROCKSDB_LIBRARY_API void rocksdb_block_based_options_set_filter_policy(
rocksdb_block_based_table_options_t* options,
rocksdb_filterpolicy_t* filter_policy);
@ -1032,9 +1016,11 @@ enum {
rocksdb_block_based_table_data_block_index_type_binary_search = 0,
rocksdb_block_based_table_data_block_index_type_binary_search_and_hash = 1,
};
extern ROCKSDB_LIBRARY_API void rocksdb_block_based_options_set_data_block_index_type(
extern ROCKSDB_LIBRARY_API void
rocksdb_block_based_options_set_data_block_index_type(
rocksdb_block_based_table_options_t*, int); // uses one of the above enums
extern ROCKSDB_LIBRARY_API void rocksdb_block_based_options_set_data_block_hash_ratio(
extern ROCKSDB_LIBRARY_API void
rocksdb_block_based_options_set_data_block_hash_ratio(
rocksdb_block_based_table_options_t* options, double v);
// rocksdb_block_based_options_set_hash_index_allow_collision()
// is removed since BlockBasedTableOptions.hash_index_allow_collision()
@ -1075,11 +1061,14 @@ extern ROCKSDB_LIBRARY_API void rocksdb_options_set_cuckoo_table_factory(
rocksdb_options_t* opt, rocksdb_cuckoo_table_options_t* table_options);
/* Options */
extern ROCKSDB_LIBRARY_API void rocksdb_set_options(
rocksdb_t* db, int count, const char* const keys[], const char* const values[], char** errptr);
extern ROCKSDB_LIBRARY_API void rocksdb_set_options(rocksdb_t* db, int count,
const char* const keys[],
const char* const values[],
char** errptr);
extern ROCKSDB_LIBRARY_API void rocksdb_set_options_cf(
rocksdb_t* db, rocksdb_column_family_handle_t* handle, int count, const char* const keys[], const char* const values[], char** errptr);
rocksdb_t* db, rocksdb_column_family_handle_t* handle, int count,
const char* const keys[], const char* const values[], char** errptr);
extern ROCKSDB_LIBRARY_API rocksdb_options_t* rocksdb_options_create(void);
extern ROCKSDB_LIBRARY_API void rocksdb_options_destroy(rocksdb_options_t*);
@ -1094,9 +1083,8 @@ extern ROCKSDB_LIBRARY_API void rocksdb_options_optimize_level_style_compaction(
extern ROCKSDB_LIBRARY_API void
rocksdb_options_optimize_universal_style_compaction(
rocksdb_options_t* opt, uint64_t memtable_memory_budget);
extern ROCKSDB_LIBRARY_API void
rocksdb_options_set_allow_ingest_behind(rocksdb_options_t*,
unsigned char);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_allow_ingest_behind(
rocksdb_options_t*, unsigned char);
extern ROCKSDB_LIBRARY_API unsigned char
rocksdb_options_get_allow_ingest_behind(rocksdb_options_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_compaction_filter(
@ -1132,9 +1120,8 @@ extern ROCKSDB_LIBRARY_API void rocksdb_options_set_paranoid_checks(
rocksdb_options_t*, unsigned char);
extern ROCKSDB_LIBRARY_API unsigned char rocksdb_options_get_paranoid_checks(
rocksdb_options_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_db_paths(rocksdb_options_t*,
const rocksdb_dbpath_t** path_values,
size_t num_paths);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_db_paths(
rocksdb_options_t*, const rocksdb_dbpath_t** path_values, size_t num_paths);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_env(rocksdb_options_t*,
rocksdb_env_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_info_log(rocksdb_options_t*,
@ -1383,12 +1370,14 @@ extern ROCKSDB_LIBRARY_API void rocksdb_options_set_recycle_log_file_num(
rocksdb_options_t*, size_t);
extern ROCKSDB_LIBRARY_API size_t
rocksdb_options_get_recycle_log_file_num(rocksdb_options_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_soft_pending_compaction_bytes_limit(
rocksdb_options_t* opt, size_t v);
extern ROCKSDB_LIBRARY_API void
rocksdb_options_set_soft_pending_compaction_bytes_limit(rocksdb_options_t* opt,
size_t v);
extern ROCKSDB_LIBRARY_API size_t
rocksdb_options_get_soft_pending_compaction_bytes_limit(rocksdb_options_t* opt);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_hard_pending_compaction_bytes_limit(
rocksdb_options_t* opt, size_t v);
extern ROCKSDB_LIBRARY_API void
rocksdb_options_set_hard_pending_compaction_bytes_limit(rocksdb_options_t* opt,
size_t v);
extern ROCKSDB_LIBRARY_API size_t
rocksdb_options_get_hard_pending_compaction_bytes_limit(rocksdb_options_t* opt);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_max_manifest_file_size(
@ -1508,8 +1497,9 @@ extern ROCKSDB_LIBRARY_API void rocksdb_options_prepare_for_bulk_load(
rocksdb_options_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_memtable_vector_rep(
rocksdb_options_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_memtable_prefix_bloom_size_ratio(
rocksdb_options_t*, double);
extern ROCKSDB_LIBRARY_API void
rocksdb_options_set_memtable_prefix_bloom_size_ratio(rocksdb_options_t*,
double);
extern ROCKSDB_LIBRARY_API double
rocksdb_options_get_memtable_prefix_bloom_size_ratio(rocksdb_options_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_max_compaction_bytes(
@ -1614,8 +1604,7 @@ extern ROCKSDB_LIBRARY_API unsigned char rocksdb_options_get_atomic_flush(
rocksdb_options_t* opt);
extern ROCKSDB_LIBRARY_API void rocksdb_options_set_row_cache(
rocksdb_options_t* opt, rocksdb_cache_t* cache
);
rocksdb_options_t* opt, rocksdb_cache_t* cache);
extern ROCKSDB_LIBRARY_API void
rocksdb_options_add_compact_on_deletion_collector_factory(
@ -1632,7 +1621,8 @@ extern ROCKSDB_LIBRARY_API int rocksdb_options_get_wal_compression(
/* RateLimiter */
extern ROCKSDB_LIBRARY_API rocksdb_ratelimiter_t* rocksdb_ratelimiter_create(
int64_t rate_bytes_per_sec, int64_t refill_period_us, int32_t fairness);
extern ROCKSDB_LIBRARY_API void rocksdb_ratelimiter_destroy(rocksdb_ratelimiter_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_ratelimiter_destroy(
rocksdb_ratelimiter_t*);
/* PerfContext */
enum {
@ -1731,8 +1721,8 @@ extern ROCKSDB_LIBRARY_API void rocksdb_perfcontext_reset(
rocksdb_perfcontext_t* context);
extern ROCKSDB_LIBRARY_API char* rocksdb_perfcontext_report(
rocksdb_perfcontext_t* context, unsigned char exclude_zero_counters);
extern ROCKSDB_LIBRARY_API uint64_t rocksdb_perfcontext_metric(
rocksdb_perfcontext_t* context, int metric);
extern ROCKSDB_LIBRARY_API uint64_t
rocksdb_perfcontext_metric(rocksdb_perfcontext_t* context, int metric);
extern ROCKSDB_LIBRARY_API void rocksdb_perfcontext_destroy(
rocksdb_perfcontext_t* context);
@ -1877,11 +1867,13 @@ extern ROCKSDB_LIBRARY_API void rocksdb_readoptions_set_total_order_seek(
rocksdb_readoptions_t*, unsigned char);
extern ROCKSDB_LIBRARY_API unsigned char
rocksdb_readoptions_get_total_order_seek(rocksdb_readoptions_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_readoptions_set_max_skippable_internal_keys(
rocksdb_readoptions_t*, uint64_t);
extern ROCKSDB_LIBRARY_API void
rocksdb_readoptions_set_max_skippable_internal_keys(rocksdb_readoptions_t*,
uint64_t);
extern ROCKSDB_LIBRARY_API uint64_t
rocksdb_readoptions_get_max_skippable_internal_keys(rocksdb_readoptions_t*);
extern ROCKSDB_LIBRARY_API void rocksdb_readoptions_set_background_purge_on_iterator_cleanup(
extern ROCKSDB_LIBRARY_API void
rocksdb_readoptions_set_background_purge_on_iterator_cleanup(
rocksdb_readoptions_t*, unsigned char);
extern ROCKSDB_LIBRARY_API unsigned char
rocksdb_readoptions_get_background_purge_on_iterator_cleanup(
@ -1917,8 +1909,9 @@ extern ROCKSDB_LIBRARY_API void rocksdb_writeoptions_disable_WAL(
rocksdb_writeoptions_t* opt, int disable);
extern ROCKSDB_LIBRARY_API unsigned char rocksdb_writeoptions_get_disable_WAL(
rocksdb_writeoptions_t* opt);
extern ROCKSDB_LIBRARY_API void rocksdb_writeoptions_set_ignore_missing_column_families(
rocksdb_writeoptions_t*, unsigned char);
extern ROCKSDB_LIBRARY_API void
rocksdb_writeoptions_set_ignore_missing_column_families(rocksdb_writeoptions_t*,
unsigned char);
extern ROCKSDB_LIBRARY_API unsigned char
rocksdb_writeoptions_get_ignore_missing_column_families(
rocksdb_writeoptions_t*);
@ -2017,7 +2010,8 @@ rocksdb_cache_get_pinned_usage(rocksdb_cache_t* cache);
/* DBPath */
extern ROCKSDB_LIBRARY_API rocksdb_dbpath_t* rocksdb_dbpath_create(const char* path, uint64_t target_size);
extern ROCKSDB_LIBRARY_API rocksdb_dbpath_t* rocksdb_dbpath_create(
const char* path, uint64_t target_size);
extern ROCKSDB_LIBRARY_API void rocksdb_dbpath_destroy(rocksdb_dbpath_t*);
/* Env */
@ -2042,10 +2036,14 @@ extern ROCKSDB_LIBRARY_API int
rocksdb_env_get_bottom_priority_background_threads(rocksdb_env_t* env);
extern ROCKSDB_LIBRARY_API void rocksdb_env_join_all_threads(
rocksdb_env_t* env);
extern ROCKSDB_LIBRARY_API void rocksdb_env_lower_thread_pool_io_priority(rocksdb_env_t* env);
extern ROCKSDB_LIBRARY_API void rocksdb_env_lower_high_priority_thread_pool_io_priority(rocksdb_env_t* env);
extern ROCKSDB_LIBRARY_API void rocksdb_env_lower_thread_pool_cpu_priority(rocksdb_env_t* env);
extern ROCKSDB_LIBRARY_API void rocksdb_env_lower_high_priority_thread_pool_cpu_priority(rocksdb_env_t* env);
extern ROCKSDB_LIBRARY_API void rocksdb_env_lower_thread_pool_io_priority(
rocksdb_env_t* env);
extern ROCKSDB_LIBRARY_API void
rocksdb_env_lower_high_priority_thread_pool_io_priority(rocksdb_env_t* env);
extern ROCKSDB_LIBRARY_API void rocksdb_env_lower_thread_pool_cpu_priority(
rocksdb_env_t* env);
extern ROCKSDB_LIBRARY_API void
rocksdb_env_lower_high_priority_thread_pool_cpu_priority(rocksdb_env_t* env);
extern ROCKSDB_LIBRARY_API void rocksdb_env_destroy(rocksdb_env_t*);
@ -2218,10 +2216,10 @@ extern ROCKSDB_LIBRARY_API const char* rocksdb_livefiles_smallestkey(
const rocksdb_livefiles_t*, int index, size_t* size);
extern ROCKSDB_LIBRARY_API const char* rocksdb_livefiles_largestkey(
const rocksdb_livefiles_t*, int index, size_t* size);
extern ROCKSDB_LIBRARY_API uint64_t rocksdb_livefiles_entries(
const rocksdb_livefiles_t*, int index);
extern ROCKSDB_LIBRARY_API uint64_t rocksdb_livefiles_deletions(
const rocksdb_livefiles_t*, int index);
extern ROCKSDB_LIBRARY_API uint64_t
rocksdb_livefiles_entries(const rocksdb_livefiles_t*, int index);
extern ROCKSDB_LIBRARY_API uint64_t
rocksdb_livefiles_deletions(const rocksdb_livefiles_t*, int index);
extern ROCKSDB_LIBRARY_API void rocksdb_livefiles_destroy(
const rocksdb_livefiles_t*);
@ -2371,7 +2369,8 @@ extern ROCKSDB_LIBRARY_API rocksdb_transactiondb_t* rocksdb_transactiondb_open(
const rocksdb_transactiondb_options_t* txn_db_options, const char* name,
char** errptr);
extern ROCKSDB_LIBRARY_API rocksdb_transactiondb_t* rocksdb_transactiondb_open_column_families(
extern ROCKSDB_LIBRARY_API rocksdb_transactiondb_t*
rocksdb_transactiondb_open_column_families(
const rocksdb_options_t* options,
const rocksdb_transactiondb_options_t* txn_db_options, const char* name,
int num_column_families, const char* const* column_family_names,
@ -2555,7 +2554,7 @@ extern ROCKSDB_LIBRARY_API void rocksdb_transactiondb_put_cf(
extern ROCKSDB_LIBRARY_API void rocksdb_transactiondb_write(
rocksdb_transactiondb_t* txn_db, const rocksdb_writeoptions_t* options,
rocksdb_writebatch_t *batch, char** errptr);
rocksdb_writebatch_t* batch, char** errptr);
extern ROCKSDB_LIBRARY_API void rocksdb_transaction_merge(
rocksdb_transaction_t* txn, const char* key, size_t klen, const char* val,

@ -6,6 +6,7 @@
#pragma once
#include <stddef.h>
#include <stdint.h>
#include <string>
#include "rocksdb/rocksdb_namespace.h"

@ -283,7 +283,6 @@ class DB {
const std::vector<ColumnFamilyDescriptor>& column_families,
std::vector<ColumnFamilyHandle*>* handles, DB** dbptr);
// Open DB and run the compaction.
// It's a read-only operation, the result won't be installed to the DB, it
// will be output to the `output_directory`. The API should only be used with

@ -344,8 +344,7 @@ class FileSystem : public Customizable {
// The returned file may be concurrently accessed by multiple threads.
virtual IOStatus NewRandomAccessFile(
const std::string& fname, const FileOptions& file_opts,
std::unique_ptr<FSRandomAccessFile>* result,
IODebugContext* dbg) = 0;
std::unique_ptr<FSRandomAccessFile>* result, IODebugContext* dbg) = 0;
// These values match Linux definition
// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/fcntl.h#n56
enum WriteLifeTimeHint {
@ -497,7 +496,8 @@ class FileSystem : public Customizable {
virtual IOStatus Truncate(const std::string& /*fname*/, size_t /*size*/,
const IOOptions& /*options*/,
IODebugContext* /*dbg*/) {
return IOStatus::NotSupported("Truncate is not supported for this FileSystem");
return IOStatus::NotSupported(
"Truncate is not supported for this FileSystem");
}
// Create the specified directory. Returns error if directory exists.
@ -534,7 +534,8 @@ class FileSystem : public Customizable {
const std::string& /*target*/,
const IOOptions& /*options*/,
IODebugContext* /*dbg*/) {
return IOStatus::NotSupported("LinkFile is not supported for this FileSystem");
return IOStatus::NotSupported(
"LinkFile is not supported for this FileSystem");
}
virtual IOStatus NumFileLinks(const std::string& /*fname*/,
@ -548,7 +549,8 @@ class FileSystem : public Customizable {
const std::string& /*second*/,
const IOOptions& /*options*/, bool* /*res*/,
IODebugContext* /*dbg*/) {
return IOStatus::NotSupported("AreFilesSame is not supported for this FileSystem");
return IOStatus::NotSupported(
"AreFilesSame is not supported for this FileSystem");
}
// Lock the specified file. Used to prevent concurrent access to
@ -1328,8 +1330,7 @@ class FileSystemWrapper : public FileSystem {
FileSystem* target() const { return target_.get(); }
// The following text is boilerplate that forwards all methods to target()
IOStatus NewSequentialFile(const std::string& f,
const FileOptions& file_opts,
IOStatus NewSequentialFile(const std::string& f, const FileOptions& file_opts,
std::unique_ptr<FSSequentialFile>* r,
IODebugContext* dbg) override {
return target_->NewSequentialFile(f, file_opts, r, dbg);
@ -1356,8 +1357,7 @@ class FileSystemWrapper : public FileSystem {
const FileOptions& file_opts,
std::unique_ptr<FSWritableFile>* r,
IODebugContext* dbg) override {
return target_->ReuseWritableFile(fname, old_fname, file_opts, r,
dbg);
return target_->ReuseWritableFile(fname, old_fname, file_opts, r, dbg);
}
IOStatus NewRandomRWFile(const std::string& fname,
const FileOptions& file_opts,

@ -14,11 +14,13 @@
#pragma once
#include <string>
#include "rocksdb/slice.h"
#ifdef OS_WIN
#include <string.h>
#endif
#include <cstring>
#include "status.h"
namespace ROCKSDB_NAMESPACE {

@ -5,6 +5,7 @@
#pragma once
#include <stdint.h>
#include <string>
#include "rocksdb/perf_level.h"

@ -6,6 +6,7 @@
#ifndef ROCKSDB_LITE
#include <string>
#include <vector>
#include "rocksdb/db.h"
#include "rocksdb/options.h"

@ -6,6 +6,7 @@
#pragma once
#include <stdint.h>
#include <map>
#include <string>

@ -6,6 +6,7 @@
#pragma once
#include <stdint.h>
#include <string>
#include "rocksdb/rocksdb_namespace.h"

@ -8,6 +8,7 @@
#pragma once
#include <stdint.h>
#include <memory>
#include <string>

@ -7,6 +7,7 @@
#include <memory>
#include <vector>
#include "rocksdb/status.h"
#include "rocksdb/types.h"
#include "rocksdb/write_batch.h"

@ -6,6 +6,7 @@
#pragma once
#include <stdint.h>
#include "rocksdb/slice.h"
namespace ROCKSDB_NAMESPACE {

@ -10,6 +10,7 @@
#include <string>
#include <vector>
#include "rocksdb/status.h"
namespace ROCKSDB_NAMESPACE {

@ -23,6 +23,7 @@
#include <algorithm>
#include <iostream>
#include <vector>
#include "rocksdb/env.h"
namespace ROCKSDB_NAMESPACE {

@ -6,6 +6,7 @@
#pragma once
#include <string>
#include "rocksdb/options.h"
#include "rocksdb/status.h"

@ -111,14 +111,14 @@ enum class OptionTypeFlags : uint32_t {
kStringNameOnly = 0x8000, // The option serializes to a name only
};
inline OptionTypeFlags operator|(const OptionTypeFlags &a,
const OptionTypeFlags &b) {
inline OptionTypeFlags operator|(const OptionTypeFlags& a,
const OptionTypeFlags& b) {
return static_cast<OptionTypeFlags>(static_cast<uint32_t>(a) |
static_cast<uint32_t>(b));
}
inline OptionTypeFlags operator&(const OptionTypeFlags &a,
const OptionTypeFlags &b) {
inline OptionTypeFlags operator&(const OptionTypeFlags& a,
const OptionTypeFlags& b) {
return static_cast<OptionTypeFlags>(static_cast<uint32_t>(a) &
static_cast<uint32_t>(b));
}

@ -6,8 +6,10 @@
#pragma once
#include <stdint.h>
#include <memory>
#include <string>
#include "rocksdb/cache.h"
#include "rocksdb/env.h"
#include "rocksdb/slice.h"

@ -7,6 +7,7 @@
#include <map>
#include <memory>
#include <string>
#include "rocksdb/db.h"
#ifdef _WIN32
@ -131,8 +132,8 @@ class StackableDB : public DB {
const size_t num_keys, const Slice* keys,
PinnableSlice* values, Status* statuses,
const bool sorted_input = false) override {
return db_->MultiGet(options, column_family, num_keys, keys,
values, statuses, sorted_input);
return db_->MultiGet(options, column_family, num_keys, keys, values,
statuses, sorted_input);
}
using DB::IngestExternalFile;
@ -473,8 +474,7 @@ class StackableDB : public DB {
return db_->GetCurrentWalFile(current_log_file);
}
virtual Status GetCreationTimeOfOldestFile(
uint64_t* creation_time) override {
virtual Status GetCreationTimeOfOldestFile(uint64_t* creation_time) override {
return db_->GetCreationTimeOfOldestFile(creation_time);
}

Loading…
Cancel
Save