|
28 | 28 | #include "rocksdb/env.h" |
29 | 29 | #include "rocksdb/iterator.h" |
30 | 30 | #include "rocksdb/utilities/stackable_db.h" |
31 | | -#include "rocksdb/utilities/transaction.h" |
32 | | -#include "table/meta_blocks.h" |
33 | 31 | #include "test_util/sync_point.h" |
34 | 32 | #include "util/cast_util.h" |
35 | 33 | #include "util/crc32c.h" |
36 | 34 | #include "util/mutexlock.h" |
37 | | -#include "util/random.h" |
38 | 35 | #include "util/stop_watch.h" |
39 | 36 | #include "util/timer_queue.h" |
40 | 37 | #include "utilities/blob_db/blob_compaction_filter.h" |
@@ -85,8 +82,7 @@ BlobDBImpl::BlobDBImpl(const std::string& dbname, |
85 | 82 | closed_(true), |
86 | 83 | open_file_count_(0), |
87 | 84 | total_blob_size_(0), |
88 | | - live_sst_size_(0), |
89 | | - debug_level_(0) { |
| 85 | + live_sst_size_(0) { |
90 | 86 | clock_ = env_->GetSystemClock().get(); |
91 | 87 | blob_dir_ = dbname + "/" + kBlobDirName; |
92 | 88 | file_options_.bytes_per_sync = kBytesPerSync; |
@@ -740,11 +736,6 @@ Status BlobDBImpl::CreateWriterLocked(const std::shared_ptr<BlobFile>& bfile) { |
740 | 736 | statistics_, Histograms::BLOB_DB_BLOB_FILE_WRITE_MICROS)); |
741 | 737 |
|
742 | 738 | uint64_t boffset = bfile->GetFileSize(); |
743 | | - if (debug_level_ >= 2 && boffset) { |
744 | | - ROCKS_LOG_DEBUG(db_options_.info_log, |
745 | | - "Open blob file: %s with offset: %" PRIu64, fpath.c_str(), |
746 | | - boffset); |
747 | | - } |
748 | 739 |
|
749 | 740 | BlobLogWriter::ElemType et = BlobLogWriter::kEtNone; |
750 | 741 | if (bfile->file_size_ == BlobLogHeader::kSize) { |
@@ -1365,15 +1356,6 @@ Status BlobDBImpl::GetRawBlobFromFile(const Slice& key, uint64_t file_number, |
1365 | 1356 | // valid offset. |
1366 | 1357 | if (offset < |
1367 | 1358 | (BlobLogHeader::kSize + BlobLogRecord::kHeaderSize + key.size())) { |
1368 | | - if (debug_level_ >= 2) { |
1369 | | - ROCKS_LOG_ERROR(db_options_.info_log, |
1370 | | - "Invalid blob index file_number: %" PRIu64 |
1371 | | - " blob_offset: %" PRIu64 " blob_size: %" PRIu64 |
1372 | | - " key: %s", |
1373 | | - file_number, offset, size, |
1374 | | - key.ToString(/* output_hex */ true).c_str()); |
1375 | | - } |
1376 | | - |
1377 | 1359 | return Status::NotFound("Invalid blob offset"); |
1378 | 1360 | } |
1379 | 1361 |
|
@@ -1463,15 +1445,6 @@ Status BlobDBImpl::GetRawBlobFromFile(const Slice& key, uint64_t file_number, |
1463 | 1445 | blob_record.size() - sizeof(uint32_t)); |
1464 | 1446 | crc = crc32c::Mask(crc); // Adjust for storage |
1465 | 1447 | if (crc != crc_exp) { |
1466 | | - if (debug_level_ >= 2) { |
1467 | | - ROCKS_LOG_ERROR( |
1468 | | - db_options_.info_log, |
1469 | | - "Blob crc mismatch file: %" PRIu64 " blob_offset: %" PRIu64 |
1470 | | - " blob_size: %" PRIu64 " key: %s status: '%s'", |
1471 | | - file_number, offset, size, |
1472 | | - key.ToString(/* output_hex */ true).c_str(), s.ToString().c_str()); |
1473 | | - } |
1474 | | - |
1475 | 1448 | return Status::Corruption("Corruption. Blob CRC mismatch"); |
1476 | 1449 | } |
1477 | 1450 |
|
@@ -1930,14 +1903,6 @@ std::pair<bool, int64_t> BlobDBImpl::DeleteObsoleteFiles(bool aborted) { |
1930 | 1903 | return std::make_pair(!aborted, -1); |
1931 | 1904 | } |
1932 | 1905 |
|
1933 | | -void BlobDBImpl::CopyBlobFiles( |
1934 | | - std::vector<std::shared_ptr<BlobFile>>* bfiles_copy) { |
1935 | | - ReadLock rl(&mutex_); |
1936 | | - for (auto const& p : blob_files_) { |
1937 | | - bfiles_copy->push_back(p.second); |
1938 | | - } |
1939 | | -} |
1940 | | - |
1941 | 1906 | Iterator* BlobDBImpl::NewIterator(const ReadOptions& _read_options) { |
1942 | 1907 | if (_read_options.io_activity != Env::IOActivity::kUnknown && |
1943 | 1908 | _read_options.io_activity != Env::IOActivity::kDBIterator) { |
|
0 commit comments