Skip to content

Commit

Permalink
Revert ingest check
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Zhang <yang.zhang@pingcap.com>
  • Loading branch information
v01dstar committed Oct 22, 2024
1 parent 47fefaf commit 43ee15f
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions db/external_sst_file_ingestion_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).


#include "db/external_sst_file_ingestion_job.h"

#include <algorithm>
Expand Down Expand Up @@ -912,16 +911,19 @@ Status ExternalSstFileIngestionJob::AssignLevelAndSeqnoForIngestedFile(
if (lvl > 0 && lvl < vstorage->base_level()) {
continue;
}
if (cfd_->RangeOverlapWithCompaction(
file_to_ingest->smallest_internal_key.user_key(),
file_to_ingest->largest_internal_key.user_key(), lvl)) {
// We must use L0 or any level higher than `lvl` to be able to overwrite
// the compaction output keys that we overlap with in this level, We also
// need to assign this file a seqno to overwrite the compaction output
// keys in level `lvl`
overlap_with_db = true;
break;
} else if (vstorage->NumLevelFiles(lvl) > 0) {
// if (cfd_->RangeOverlapWithCompaction(
// file_to_ingest->smallest_internal_key.user_key(),
// file_to_ingest->largest_internal_key.user_key(), lvl)) {
// // We must use L0 or any level higher than `lvl` to be able to
// overwrite
// // the compaction output keys that we overlap with in this level, We
// also
// // need to assign this file a seqno to overwrite the compaction output
// // keys in level `lvl`
// overlap_with_db = true;
// break;
// } else if (vstorage->NumLevelFiles(lvl) > 0) {
if (vstorage->NumLevelFiles(lvl) > 0) {
bool overlap_with_level = false;
status = sv->current->OverlapWithLevelIterator(
ro, env_options_, file_to_ingest->smallest_internal_key.user_key(),
Expand Down

0 comments on commit 43ee15f

Please sign in to comment.