|
|
@ -1041,6 +1041,7 @@ Status CompactionJob::FinishCompactionOutputFile( |
|
|
|
auto meta = &sub_compact->current_output()->meta; |
|
|
|
auto meta = &sub_compact->current_output()->meta; |
|
|
|
if (s.ok()) { |
|
|
|
if (s.ok()) { |
|
|
|
Slice lower_bound_guard, upper_bound_guard; |
|
|
|
Slice lower_bound_guard, upper_bound_guard; |
|
|
|
|
|
|
|
std::string smallest_user_key; |
|
|
|
const Slice *lower_bound, *upper_bound; |
|
|
|
const Slice *lower_bound, *upper_bound; |
|
|
|
if (sub_compact->outputs.size() == 1) { |
|
|
|
if (sub_compact->outputs.size() == 1) { |
|
|
|
// For the first output table, include range tombstones before the min key
|
|
|
|
// For the first output table, include range tombstones before the min key
|
|
|
@ -1050,7 +1051,8 @@ Status CompactionJob::FinishCompactionOutputFile( |
|
|
|
// For subsequent output tables, only include range tombstones from min
|
|
|
|
// For subsequent output tables, only include range tombstones from min
|
|
|
|
// key onwards since the previous file was extended to contain range
|
|
|
|
// key onwards since the previous file was extended to contain range
|
|
|
|
// tombstones falling before min key.
|
|
|
|
// tombstones falling before min key.
|
|
|
|
lower_bound_guard = meta->smallest.user_key(); |
|
|
|
smallest_user_key = meta->smallest.user_key().ToString(false /*hex*/); |
|
|
|
|
|
|
|
lower_bound_guard = Slice(smallest_user_key); |
|
|
|
lower_bound = &lower_bound_guard; |
|
|
|
lower_bound = &lower_bound_guard; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
lower_bound = nullptr; |
|
|
|
lower_bound = nullptr; |
|
|
|