Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
rust-rocksdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangzongwu
rust-rocksdb
Commits
a91974aa
Unverified
Commit
a91974aa
authored
May 02, 2018
by
Huachao Huang
Committed by
GitHub
May 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Squashed 'librocksdb_sys/rocksdb/' changes from 185a70d..cf55663 (#204)
parent
354332f8
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
81 additions
and
49 deletions
+81
-49
column_family.cc
librocksdb_sys/rocksdb/db/column_family.cc
+5
-3
column_family.h
librocksdb_sys/rocksdb/db/column_family.h
+3
-3
compaction.cc
librocksdb_sys/rocksdb/db/compaction.cc
+6
-1
compaction.h
librocksdb_sys/rocksdb/db/compaction.h
+4
-0
compaction_job.cc
librocksdb_sys/rocksdb/db/compaction_job.cc
+1
-1
compaction_job_test.cc
librocksdb_sys/rocksdb/db/compaction_job_test.cc
+1
-1
compaction_picker.cc
librocksdb_sys/rocksdb/db/compaction_picker.cc
+26
-18
compaction_picker.h
librocksdb_sys/rocksdb/db/compaction_picker.h
+14
-9
compaction_picker_universal.cc
librocksdb_sys/rocksdb/db/compaction_picker_universal.cc
+4
-4
db_impl.h
librocksdb_sys/rocksdb/db/db_impl.h
+1
-0
db_impl_compaction_flush.cc
librocksdb_sys/rocksdb/db/db_impl_compaction_flush.cc
+7
-5
db_impl_debug.cc
librocksdb_sys/rocksdb/db/db_impl_debug.cc
+1
-1
db_range_del_test.cc
librocksdb_sys/rocksdb/db/db_range_del_test.cc
+2
-2
options.h
librocksdb_sys/rocksdb/include/rocksdb/options.h
+6
-1
No files found.
librocksdb_sys/rocksdb/db/column_family.cc
View file @
a91974aa
...
...
@@ -828,11 +828,13 @@ const int ColumnFamilyData::kCompactToBaseLevel = -2;
Compaction
*
ColumnFamilyData
::
CompactRange
(
const
MutableCFOptions
&
mutable_cf_options
,
int
input_level
,
int
output_level
,
uint32_t
output_path_id
,
const
InternalKey
*
begin
,
const
InternalKey
*
end
,
InternalKey
**
compaction_end
,
bool
*
conflict
)
{
int
output_level
,
uint32_t
output_path_id
,
uint32_t
max_subcompactions
,
const
InternalKey
*
begin
,
const
InternalKey
*
end
,
InternalKey
**
compaction_end
,
bool
*
conflict
)
{
auto
*
result
=
compaction_picker_
->
CompactRange
(
GetName
(),
mutable_cf_options
,
current_
->
storage_info
(),
input_level
,
output_level
,
output_path_id
,
begin
,
end
,
compaction_end
,
conflict
);
output_level
,
output_path_id
,
max_subcompactions
,
begin
,
end
,
compaction_end
,
conflict
);
if
(
result
!=
nullptr
)
{
result
->
SetInputVersion
(
current_
);
}
...
...
librocksdb_sys/rocksdb/db/column_family.h
View file @
a91974aa
...
...
@@ -271,9 +271,9 @@ class ColumnFamilyData {
// REQUIRES: DB mutex held
Compaction
*
CompactRange
(
const
MutableCFOptions
&
mutable_cf_options
,
int
input_level
,
int
output_level
,
uint32_t
output_path_id
,
const
InternalKey
*
begin
,
const
InternalKey
*
end
,
InternalKey
**
compaction_
end
,
bool
*
manual_conflict
);
uint32_t
output_path_id
,
uint32_t
max_subcompactions
,
const
InternalKey
*
begin
,
const
InternalKey
*
end
,
InternalKey
**
compaction_end
,
bool
*
manual_conflict
);
CompactionPicker
*
compaction_picker
()
{
return
compaction_picker_
.
get
();
}
// thread-safe
...
...
librocksdb_sys/rocksdb/db/compaction.cc
View file @
a91974aa
...
...
@@ -146,6 +146,7 @@ Compaction::Compaction(VersionStorageInfo* vstorage,
int
_output_level
,
uint64_t
_target_file_size
,
uint64_t
_max_compaction_bytes
,
uint32_t
_output_path_id
,
CompressionType
_compression
,
uint32_t
_max_subcompactions
,
std
::
vector
<
FileMetaData
*>
_grandparents
,
bool
_manual_compaction
,
double
_score
,
bool
_deletion_compaction
,
...
...
@@ -155,6 +156,7 @@ Compaction::Compaction(VersionStorageInfo* vstorage,
output_level_
(
_output_level
),
max_output_file_size_
(
_target_file_size
),
max_compaction_bytes_
(
_max_compaction_bytes
),
max_subcompactions_
(
_max_subcompactions
),
immutable_cf_options_
(
_immutable_cf_options
),
mutable_cf_options_
(
_mutable_cf_options
),
input_version_
(
nullptr
),
...
...
@@ -175,6 +177,9 @@ Compaction::Compaction(VersionStorageInfo* vstorage,
if
(
is_manual_compaction_
)
{
compaction_reason_
=
CompactionReason
::
kManualCompaction
;
}
if
(
max_subcompactions_
==
0
)
{
max_subcompactions_
=
immutable_cf_options_
.
max_subcompactions
;
}
#ifndef NDEBUG
for
(
size_t
i
=
1
;
i
<
inputs_
.
size
();
++
i
)
{
...
...
@@ -452,7 +457,7 @@ bool Compaction::IsOutputLevelEmpty() const {
}
bool
Compaction
::
ShouldFormSubcompactions
()
const
{
if
(
immutable_cf_options_
.
max_subcompactions
<=
1
||
cfd_
==
nullptr
)
{
if
(
max_subcompactions_
<=
1
||
cfd_
==
nullptr
)
{
return
false
;
}
if
(
cfd_
->
ioptions
()
->
compaction_style
==
kCompactionStyleLevel
)
{
...
...
librocksdb_sys/rocksdb/db/compaction.h
View file @
a91974aa
...
...
@@ -40,6 +40,7 @@ class Compaction {
std
::
vector
<
CompactionInputFiles
>
inputs
,
int
output_level
,
uint64_t
target_file_size
,
uint64_t
max_compaction_bytes
,
uint32_t
output_path_id
,
CompressionType
compression
,
uint32_t
max_subcompactions
,
std
::
vector
<
FileMetaData
*>
grandparents
,
bool
manual_compaction
=
false
,
double
score
=
-
1
,
bool
deletion_compaction
=
false
,
...
...
@@ -241,6 +242,8 @@ class Compaction {
uint64_t
max_compaction_bytes
()
const
{
return
max_compaction_bytes_
;
}
uint32_t
max_subcompactions
()
const
{
return
max_subcompactions_
;
}
uint64_t
MaxInputFileCreationTime
()
const
;
private
:
...
...
@@ -267,6 +270,7 @@ class Compaction {
const
int
output_level_
;
// levels to which output files are stored
uint64_t
max_output_file_size_
;
uint64_t
max_compaction_bytes_
;
uint32_t
max_subcompactions_
;
const
ImmutableCFOptions
immutable_cf_options_
;
const
MutableCFOptions
mutable_cf_options_
;
Version
*
input_version_
;
...
...
librocksdb_sys/rocksdb/db/compaction_job.cc
View file @
a91974aa
...
...
@@ -482,7 +482,7 @@ void CompactionJob::GenSubcompactionBoundaries() {
c
->
mutable_cf_options
()
->
MaxFileSizeForLevel
(
out_lvl
)));
uint64_t
subcompactions
=
std
::
min
({
static_cast
<
uint64_t
>
(
ranges
.
size
()),
static_cast
<
uint64_t
>
(
db_options_
.
max_subcompactions
),
static_cast
<
uint64_t
>
(
c
->
max_subcompactions
()
),
max_output_files
});
if
(
subcompactions
>
1
)
{
...
...
librocksdb_sys/rocksdb/db/compaction_job_test.cc
View file @
a91974aa
...
...
@@ -244,7 +244,7 @@ class CompactionJobTest : public testing::Test {
Compaction
compaction
(
cfd
->
current
()
->
storage_info
(),
*
cfd
->
ioptions
(),
*
cfd
->
GetLatestMutableCFOptions
(),
compaction_input_files
,
1
,
1024
*
1024
,
10
*
1024
*
1024
,
0
,
kNoCompression
,
{},
true
);
10
*
1024
*
1024
,
0
,
kNoCompression
,
0
,
{},
true
);
compaction
.
SetInputVersion
(
cfd
->
current
());
LogBuffer
log_buffer
(
InfoLogLevel
::
INFO_LEVEL
,
db_options_
.
info_log
.
get
());
...
...
librocksdb_sys/rocksdb/db/compaction_picker.cc
View file @
a91974aa
...
...
@@ -307,10 +307,9 @@ Compaction* CompactionPicker::CompactFiles(
new
Compaction
(
vstorage
,
ioptions_
,
mutable_cf_options
,
input_files
,
output_level
,
compact_options
.
output_file_size_limit
,
mutable_cf_options
.
max_compaction_bytes
,
output_path_id
,
compact_options
.
compression
,
/* grandparents */
{},
true
);
// If it's level 0 compaction, make sure we don't execute any other level 0
// compactions in parallel
compact_options
.
compression
,
compact_options
.
max_subcompactions
,
/* grandparents */
{},
true
);
RegisterCompaction
(
c
);
return
c
;
}
...
...
@@ -510,7 +509,8 @@ void CompactionPicker::GetGrandparents(
Compaction
*
CompactionPicker
::
CompactRange
(
const
std
::
string
&
cf_name
,
const
MutableCFOptions
&
mutable_cf_options
,
VersionStorageInfo
*
vstorage
,
int
input_level
,
int
output_level
,
uint32_t
output_path_id
,
const
InternalKey
*
begin
,
const
InternalKey
*
end
,
uint32_t
output_path_id
,
uint32_t
max_subcompactions
,
const
InternalKey
*
begin
,
const
InternalKey
*
end
,
InternalKey
**
compaction_end
,
bool
*
manual_conflict
)
{
// CompactionPickerFIFO has its own implementation of compact range
assert
(
ioptions_
.
compaction_style
!=
kCompactionStyleFIFO
);
...
...
@@ -576,7 +576,7 @@ Compaction* CompactionPicker::CompactRange(
/* max_compaction_bytes */
LLONG_MAX
,
output_path_id
,
GetCompressionType
(
ioptions_
,
vstorage
,
mutable_cf_options
,
output_level
,
1
),
/* grandparents */
{},
/* is manual */
true
);
max_subcompactions
,
/* grandparents */
{},
/* is manual */
true
);
RegisterCompaction
(
c
);
return
c
;
}
...
...
@@ -683,7 +683,8 @@ Compaction* CompactionPicker::CompactRange(
mutable_cf_options
.
max_compaction_bytes
,
output_path_id
,
GetCompressionType
(
ioptions_
,
vstorage
,
mutable_cf_options
,
output_level
,
vstorage
->
base_level
()),
std
::
move
(
grandparents
),
/* is manual compaction */
true
);
/* max_subcompactions */
0
,
std
::
move
(
grandparents
),
/* is manual compaction */
true
);
TEST_SYNC_POINT_CALLBACK
(
"CompactionPicker::CompactRange:Return"
,
compaction
);
RegisterCompaction
(
compaction
);
...
...
@@ -1247,8 +1248,8 @@ Compaction* LevelCompactionBuilder::GetCompaction() {
GetPathId
(
ioptions_
,
mutable_cf_options_
,
output_level_
),
GetCompressionType
(
ioptions_
,
vstorage_
,
mutable_cf_options_
,
output_level_
,
vstorage_
->
base_level
()),
std
::
move
(
grandparents_
),
is_manual_
,
start_level_score
_
,
false
/* deletion_compaction */
,
compaction_reason_
);
/* max_subcompactions */
0
,
std
::
move
(
grandparents_
),
is_manual
_
,
start_level_score_
,
false
/* deletion_compaction */
,
compaction_reason_
);
// If it's level 0 compaction, make sure we don't execute any other level 0
// compactions in parallel
...
...
@@ -1480,8 +1481,9 @@ Compaction* FIFOCompactionPicker::PickTTLCompaction(
Compaction
*
c
=
new
Compaction
(
vstorage
,
ioptions_
,
mutable_cf_options
,
std
::
move
(
inputs
),
0
,
0
,
0
,
0
,
kNoCompression
,
{},
/* is manual */
false
,
vstorage
->
CompactionScore
(
0
),
/* is deletion compaction */
true
,
CompactionReason
::
kFIFOTtl
);
kNoCompression
,
/* max_subcompactions */
0
,
{},
/* is manual */
false
,
vstorage
->
CompactionScore
(
0
),
/* is deletion compaction */
true
,
CompactionReason
::
kFIFOTtl
);
return
c
;
}
...
...
@@ -1507,9 +1509,9 @@ Compaction* FIFOCompactionPicker::PickSizeCompaction(
vstorage
,
ioptions_
,
mutable_cf_options
,
{
comp_inputs
},
0
,
16
*
1024
*
1024
/* output file size limit */
,
0
/* max compaction bytes, not applicable */
,
0
/* output path ID */
,
mutable_cf_options
.
compression
,
{},
/* is manual */
false
,
vstorage
->
CompactionScore
(
0
)
,
/* is deletion compaction */
false
,
0
/* output path ID */
,
mutable_cf_options
.
compression
,
0
/* max_subcompactions */
,
{},
/* is manual */
false
,
vstorage
->
CompactionScore
(
0
),
/* is deletion compaction */
false
,
CompactionReason
::
kFIFOReduceNumFiles
);
return
c
;
}
...
...
@@ -1553,8 +1555,9 @@ Compaction* FIFOCompactionPicker::PickSizeCompaction(
Compaction
*
c
=
new
Compaction
(
vstorage
,
ioptions_
,
mutable_cf_options
,
std
::
move
(
inputs
),
0
,
0
,
0
,
0
,
kNoCompression
,
{},
/* is manual */
false
,
vstorage
->
CompactionScore
(
0
),
/* is deletion compaction */
true
,
CompactionReason
::
kFIFOMaxSize
);
kNoCompression
,
/* max_subcompactions */
0
,
{},
/* is manual */
false
,
vstorage
->
CompactionScore
(
0
),
/* is deletion compaction */
true
,
CompactionReason
::
kFIFOMaxSize
);
return
c
;
}
...
...
@@ -1577,8 +1580,13 @@ Compaction* FIFOCompactionPicker::PickCompaction(
Compaction
*
FIFOCompactionPicker
::
CompactRange
(
const
std
::
string
&
cf_name
,
const
MutableCFOptions
&
mutable_cf_options
,
VersionStorageInfo
*
vstorage
,
int
input_level
,
int
output_level
,
uint32_t
output_path_id
,
const
InternalKey
*
begin
,
const
InternalKey
*
end
,
InternalKey
**
compaction_end
,
bool
*
manual_conflict
)
{
uint32_t
/*output_path_id*/
,
uint32_t
/*max_subcompactions*/
,
const
InternalKey
*
/*begin*/
,
const
InternalKey
*
/*end*/
,
InternalKey
**
compaction_end
,
bool
*
/*manual_conflict*/
)
{
#ifdef NDEBUG
(
void
)
input_level
;
(
void
)
output_level
;
#endif
assert
(
input_level
==
0
);
assert
(
output_level
==
0
);
*
compaction_end
=
nullptr
;
...
...
librocksdb_sys/rocksdb/db/compaction_picker.h
View file @
a91974aa
...
...
@@ -58,7 +58,8 @@ class CompactionPicker {
virtual
Compaction
*
CompactRange
(
const
std
::
string
&
cf_name
,
const
MutableCFOptions
&
mutable_cf_options
,
VersionStorageInfo
*
vstorage
,
int
input_level
,
int
output_level
,
uint32_t
output_path_id
,
const
InternalKey
*
begin
,
const
InternalKey
*
end
,
uint32_t
output_path_id
,
uint32_t
max_subcompactions
,
const
InternalKey
*
begin
,
const
InternalKey
*
end
,
InternalKey
**
compaction_end
,
bool
*
manual_conflict
);
// The maximum allowed output level. Default value is NumberLevels() - 1.
...
...
@@ -234,7 +235,8 @@ class FIFOCompactionPicker : public CompactionPicker {
virtual
Compaction
*
CompactRange
(
const
std
::
string
&
cf_name
,
const
MutableCFOptions
&
mutable_cf_options
,
VersionStorageInfo
*
vstorage
,
int
input_level
,
int
output_level
,
uint32_t
output_path_id
,
const
InternalKey
*
begin
,
const
InternalKey
*
end
,
uint32_t
output_path_id
,
uint32_t
max_subcompactions
,
const
InternalKey
*
begin
,
const
InternalKey
*
end
,
InternalKey
**
compaction_end
,
bool
*
manual_conflict
)
override
;
// The maximum allowed output level. Always returns 0.
...
...
@@ -271,13 +273,16 @@ class NullCompactionPicker : public CompactionPicker {
}
// Always return "nullptr"
Compaction
*
CompactRange
(
const
std
::
string
&
cf_name
,
const
MutableCFOptions
&
mutable_cf_options
,
VersionStorageInfo
*
vstorage
,
int
input_level
,
int
output_level
,
uint32_t
output_path_id
,
const
InternalKey
*
begin
,
const
InternalKey
*
end
,
InternalKey
**
compaction_end
,
bool
*
manual_conflict
)
override
{
Compaction
*
CompactRange
(
const
std
::
string
&
/*cf_name*/
,
const
MutableCFOptions
&
/*mutable_cf_options*/
,
VersionStorageInfo
*
/*vstorage*/
,
int
/*input_level*/
,
int
/*output_level*/
,
uint32_t
/*output_path_id*/
,
uint32_t
/*max_subcompactions*/
,
const
InternalKey
*
/*begin*/
,
const
InternalKey
*
/*end*/
,
InternalKey
**
/*compaction_end*/
,
bool
*
/*manual_conflict*/
)
override
{
return
nullptr
;
}
...
...
librocksdb_sys/rocksdb/db/compaction_picker_universal.cc
View file @
a91974aa
...
...
@@ -606,8 +606,8 @@ Compaction* UniversalCompactionPicker::PickCompactionToReduceSortedRuns(
mutable_cf_options
.
MaxFileSizeForLevel
(
output_level
),
LLONG_MAX
,
path_id
,
GetCompressionType
(
ioptions_
,
vstorage
,
mutable_cf_options
,
start_level
,
1
,
enable_compression
),
/*
grandparents */
{},
/* is manual */
false
,
scor
e
,
false
/* deletion_compaction */
,
compaction_reason
);
/*
max_subcompactions */
0
,
/* grandparents */
{},
/* is manual */
fals
e
,
score
,
false
/* deletion_compaction */
,
compaction_reason
);
}
// Look at overall size amplification. If size amplification
...
...
@@ -739,8 +739,8 @@ Compaction* UniversalCompactionPicker::PickCompactionToReduceSizeAmp(
/* max_grandparent_overlap_bytes */
LLONG_MAX
,
path_id
,
GetCompressionType
(
ioptions_
,
vstorage
,
mutable_cf_options
,
output_level
,
1
),
/*
grandparents */
{},
/* is manual */
false
,
scor
e
,
false
/* deletion_compaction */
,
/*
max_subcompactions */
0
,
/* grandparents */
{},
/* is manual */
fals
e
,
score
,
false
/* deletion_compaction */
,
CompactionReason
::
kUniversalSizeAmplification
);
}
}
// namespace rocksdb
...
...
librocksdb_sys/rocksdb/db/db_impl.h
View file @
a91974aa
...
...
@@ -329,6 +329,7 @@ class DBImpl : public DB {
Status
RunManualCompaction
(
ColumnFamilyData
*
cfd
,
int
input_level
,
int
output_level
,
uint32_t
output_path_id
,
uint32_t
max_subcompactions
,
const
Slice
*
begin
,
const
Slice
*
end
,
bool
exclusive
,
bool
disallow_trivial_move
=
false
);
...
...
librocksdb_sys/rocksdb/db/db_impl_compaction_flush.cc
View file @
a91974aa
...
...
@@ -311,7 +311,7 @@ Status DBImpl::CompactRange(const CompactRangeOptions& options,
}
s
=
RunManualCompaction
(
cfd
,
ColumnFamilyData
::
kCompactAllLevels
,
final_output_level
,
options
.
target_path_id
,
begin
,
end
,
exclusive
);
options
.
max_subcompactions
,
begin
,
end
,
exclusive
);
}
else
{
for
(
int
level
=
0
;
level
<=
max_level_with_files
;
level
++
)
{
int
output_level
;
...
...
@@ -345,7 +345,7 @@ Status DBImpl::CompactRange(const CompactRangeOptions& options,
}
}
s
=
RunManualCompaction
(
cfd
,
level
,
output_level
,
options
.
target_path_id
,
begin
,
end
,
exclusive
);
options
.
max_subcompactions
,
begin
,
end
,
exclusive
);
if
(
!
s
.
ok
())
{
break
;
}
...
...
@@ -799,6 +799,7 @@ Status DBImpl::Flush(const FlushOptions& flush_options,
Status
DBImpl
::
RunManualCompaction
(
ColumnFamilyData
*
cfd
,
int
input_level
,
int
output_level
,
uint32_t
output_path_id
,
uint32_t
max_subcompactions
,
const
Slice
*
begin
,
const
Slice
*
end
,
bool
exclusive
,
bool
disallow_trivial_move
)
{
assert
(
input_level
==
ColumnFamilyData
::
kCompactAllLevels
||
...
...
@@ -886,9 +887,10 @@ Status DBImpl::RunManualCompaction(ColumnFamilyData* cfd, int input_level,
((
manual
.
manual_end
=
&
manual
.
tmp_storage1
)
&&
((
compaction
=
manual
.
cfd
->
CompactRange
(
*
manual
.
cfd
->
GetLatestMutableCFOptions
(),
manual
.
input_level
,
manual
.
output_level
,
manual
.
output_path_id
,
manual
.
begin
,
manual
.
end
,
&
manual
.
manual_end
,
&
manual_conflict
))
==
nullptr
)
&&
manual_conflict
))
{
manual
.
output_level
,
manual
.
output_path_id
,
max_subcompactions
,
manual
.
begin
,
manual
.
end
,
&
manual
.
manual_end
,
&
manual_conflict
))
==
nullptr
&&
manual_conflict
)))
{
// exclusive manual compactions should not see a conflict during
// CompactRange
assert
(
!
exclusive
||
!
manual_conflict
);
...
...
librocksdb_sys/rocksdb/db/db_impl_debug.cc
View file @
a91974aa
...
...
@@ -76,7 +76,7 @@ Status DBImpl::TEST_CompactRange(int level, const Slice* begin,
cfd
->
ioptions
()
->
compaction_style
==
kCompactionStyleFIFO
)
?
level
:
level
+
1
;
return
RunManualCompaction
(
cfd
,
level
,
output_level
,
0
,
begin
,
end
,
true
,
return
RunManualCompaction
(
cfd
,
level
,
output_level
,
0
,
0
,
begin
,
end
,
true
,
disallow_trivial_move
);
}
...
...
librocksdb_sys/rocksdb/db/db_range_del_test.cc
View file @
a91974aa
...
...
@@ -433,8 +433,8 @@ TEST_F(DBRangeDelTest, ValidUniversalSubcompactionBoundaries) {
reinterpret_cast
<
ColumnFamilyHandleImpl
*>
(
db_
->
DefaultColumnFamily
())
->
cfd
(),
1
/* input_level */
,
2
/* output_level */
,
0
/* output_path_id */
,
nullptr
/* begin */
,
nullptr
/* end */
,
true
/* exclusive
*/
,
true
/* disallow_trivial_move */
));
0
/* max_subcompactions */
,
nullptr
/* begin */
,
nullptr
/* end
*/
,
true
/*
exclusive */
,
true
/*
disallow_trivial_move */
));
}
#endif // ROCKSDB_LITE
...
...
librocksdb_sys/rocksdb/include/rocksdb/options.h
View file @
a91974aa
...
...
@@ -1148,10 +1148,13 @@ struct CompactionOptions {
// Compaction will create files of size `output_file_size_limit`.
// Default: MAX, which means that compaction will create a single file
uint64_t
output_file_size_limit
;
// If > 0, it will replace the option in the DBOptions for this compaction.
uint32_t
max_subcompactions
;
CompactionOptions
()
:
compression
(
kSnappyCompression
),
output_file_size_limit
(
std
::
numeric_limits
<
uint64_t
>::
max
())
{}
output_file_size_limit
(
std
::
numeric_limits
<
uint64_t
>::
max
()),
max_subcompactions
(
0
)
{}
};
// For level based compaction, we can configure if we want to skip/force
...
...
@@ -1184,6 +1187,8 @@ struct CompactRangeOptions {
// if there is a compaction filter
BottommostLevelCompaction
bottommost_level_compaction
=
BottommostLevelCompaction
::
kIfHaveCompactionFilter
;
// If > 0, it will replace the option in the DBOptions for this compaction.
uint32_t
max_subcompactions
=
0
;
};
// IngestExternalFileOptions is used by IngestExternalFile()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment