Fix typo, add missing inclusion of state void* in invocation of
create_compaction_filter_v2_.
This commit is contained in:
parent
c1f588af71
commit
38e8b727a8
6
db/c.cc
6
db/c.cc
@ -231,7 +231,7 @@ struct rocksdb_compactionfilterfactoryv2_t : public CompactionFilterFactoryV2 {
|
|||||||
void (*destructor_)(void*);
|
void (*destructor_)(void*);
|
||||||
const char* (*name_)(void*);
|
const char* (*name_)(void*);
|
||||||
rocksdb_compactionfilterv2_t* (*create_compaction_filter_v2_)(
|
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)
|
rocksdb_compactionfilterfactoryv2_t(const SliceTransform* prefix_extractor)
|
||||||
: CompactionFilterFactoryV2(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_full_compaction = context.is_full_compaction;
|
||||||
c_context.rep.is_manual_compaction = context.is_manual_compaction;
|
c_context.rep.is_manual_compaction = context.is_manual_compaction;
|
||||||
return std::unique_ptr<CompactionFilterV2>(
|
return std::unique_ptr<CompactionFilterV2>(
|
||||||
(*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,
|
rocksdb_slicetransform_t* prefix_extractor,
|
||||||
void (*destructor)(void*),
|
void (*destructor)(void*),
|
||||||
rocksdb_compactionfilterv2_t* (*create_compaction_filter_v2)(
|
rocksdb_compactionfilterv2_t* (*create_compaction_filter_v2)(
|
||||||
const rocksdb_compactionfiltercontext_t* context),
|
void* state, const rocksdb_compactionfiltercontext_t* context),
|
||||||
const char* (*name)(void*)) {
|
const char* (*name)(void*)) {
|
||||||
rocksdb_compactionfilterfactoryv2_t* result = new rocksdb_compactionfilterfactoryv2_t(prefix_extractor);
|
rocksdb_compactionfilterfactoryv2_t* result = new rocksdb_compactionfilterfactoryv2_t(prefix_extractor);
|
||||||
result->state_ = state;
|
result->state_ = state;
|
||||||
|
@ -2838,7 +2838,7 @@ void DBImpl::CallCompactionFilterV2(CompactionState* compact,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Assemble slice vectors for user keys and existing values.
|
// 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
|
// we may need to access the sequence number in the event that
|
||||||
// keys are garbage collected during the filter process.
|
// keys are garbage collected during the filter process.
|
||||||
std::vector<ParsedInternalKey> ikey_buf;
|
std::vector<ParsedInternalKey> ikey_buf;
|
||||||
|
@ -604,7 +604,7 @@ extern rocksdb_compactionfilterfactoryv2_t* rocksdb_compactionfilterfactoryv2_cr
|
|||||||
rocksdb_slicetransform_t* prefix_extractor,
|
rocksdb_slicetransform_t* prefix_extractor,
|
||||||
void (*destructor)(void*),
|
void (*destructor)(void*),
|
||||||
rocksdb_compactionfilterv2_t* (*create_compaction_filter_v2)(
|
rocksdb_compactionfilterv2_t* (*create_compaction_filter_v2)(
|
||||||
const rocksdb_compactionfiltercontext_t* context),
|
void*, const rocksdb_compactionfiltercontext_t* context),
|
||||||
const char* (*name)(void*));
|
const char* (*name)(void*));
|
||||||
extern void rocksdb_compactionfilterfactoryv2_destroy(rocksdb_compactionfilterfactoryv2_t*);
|
extern void rocksdb_compactionfilterfactoryv2_destroy(rocksdb_compactionfilterfactoryv2_t*);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user