diff --git a/db/c.cc b/db/c.cc index fa609db7b..da2c88a11 100644 --- a/db/c.cc +++ b/db/c.cc @@ -231,7 +231,7 @@ struct rocksdb_compactionfilterfactoryv2_t : public CompactionFilterFactoryV2 { void (*destructor_)(void*); const char* (*name_)(void*); rocksdb_compactionfilterv2_t* (*create_compaction_filter_v2_)( - const rocksdb_compactionfiltercontext_t* context); + void* state, const rocksdb_compactionfiltercontext_t* context); rocksdb_compactionfilterfactoryv2_t(const SliceTransform* prefix_extractor) : CompactionFilterFactoryV2(prefix_extractor) { @@ -251,7 +251,7 @@ struct rocksdb_compactionfilterfactoryv2_t : public CompactionFilterFactoryV2 { c_context.rep.is_full_compaction = context.is_full_compaction; c_context.rep.is_manual_compaction = context.is_manual_compaction; return std::unique_ptr( - (*create_compaction_filter_v2_)(&c_context)); + (*create_compaction_filter_v2_)(state_, &c_context)); } }; @@ -1683,7 +1683,7 @@ rocksdb_compactionfilterfactoryv2_t* rocksdb_compactionfilterfactoryv2_create( rocksdb_slicetransform_t* prefix_extractor, void (*destructor)(void*), rocksdb_compactionfilterv2_t* (*create_compaction_filter_v2)( - const rocksdb_compactionfiltercontext_t* context), + void* state, const rocksdb_compactionfiltercontext_t* context), const char* (*name)(void*)) { rocksdb_compactionfilterfactoryv2_t* result = new rocksdb_compactionfilterfactoryv2_t(prefix_extractor); result->state_ = state; diff --git a/db/db_impl.cc b/db/db_impl.cc index a16bda3a1..80e8bf530 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -2838,7 +2838,7 @@ void DBImpl::CallCompactionFilterV2(CompactionState* compact, } // Assemble slice vectors for user keys and existing values. - // We also keep traack of our parsed internal key structs because + // We also keep track of our parsed internal key structs because // we may need to access the sequence number in the event that // keys are garbage collected during the filter process. std::vector ikey_buf; diff --git a/include/rocksdb/c.h b/include/rocksdb/c.h index f67893375..28b8cdca8 100644 --- a/include/rocksdb/c.h +++ b/include/rocksdb/c.h @@ -604,7 +604,7 @@ extern rocksdb_compactionfilterfactoryv2_t* rocksdb_compactionfilterfactoryv2_cr rocksdb_slicetransform_t* prefix_extractor, void (*destructor)(void*), rocksdb_compactionfilterv2_t* (*create_compaction_filter_v2)( - const rocksdb_compactionfiltercontext_t* context), + void*, const rocksdb_compactionfiltercontext_t* context), const char* (*name)(void*)); extern void rocksdb_compactionfilterfactoryv2_destroy(rocksdb_compactionfilterfactoryv2_t*);