]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/table/cuckoo/cuckoo_table_reader.cc
import quincy beta 17.1.0
[ceph.git] / ceph / src / rocksdb / table / cuckoo / cuckoo_table_reader.cc
index cd460bd0a5b50c69445ea51f8956568f6d55ac0d..1345606a57172bc210cee97eb8884e477a580be7 100644 (file)
@@ -54,6 +54,7 @@ CuckooTableReader::CuckooTableReader(
       get_slice_hash_(get_slice_hash) {
   if (!ioptions.allow_mmap_reads) {
     status_ = Status::InvalidArgument("File is not mmaped");
+    return;
   }
   TableProperties* props = nullptr;
   status_ = ReadTableProperties(file_.get(), file_size, kCuckooTableMagicNumber,
@@ -136,7 +137,8 @@ CuckooTableReader::CuckooTableReader(
   cuckoo_block_size_ = *reinterpret_cast<const uint32_t*>(
       cuckoo_block_size->second.data());
   cuckoo_block_bytes_minus_one_ = cuckoo_block_size_ * bucket_length_ - 1;
-  status_ = file_->Read(0, static_cast<size_t>(file_size), &file_data_, nullptr);
+  status_ = file_->Read(IOOptions(), 0, static_cast<size_t>(file_size),
+                        &file_data_, nullptr, nullptr);
 }
 
 Status CuckooTableReader::Get(const ReadOptions& /*readOptions*/,
@@ -170,7 +172,9 @@ Status CuckooTableReader::Get(const ReadOptions& /*readOptions*/,
         } else {
           Slice full_key(bucket, key_length_);
           ParsedInternalKey found_ikey;
-          ParseInternalKey(full_key, &found_ikey);
+          Status s = ParseInternalKey(full_key, &found_ikey,
+                                      false /* log_err_key */);  // TODO
+          if (!s.ok()) return s;
           bool dont_care __attribute__((__unused__));
           get_context->SaveValue(found_ikey, value, &dont_care);
         }
@@ -378,7 +382,8 @@ InternalIterator* CuckooTableReader::NewIterator(
     const ReadOptions& /*read_options*/,
     const SliceTransform* /* prefix_extractor */, Arena* arena,
     bool /*skip_filters*/, TableReaderCaller /*caller*/,
-    size_t /*compaction_readahead_size*/) {
+    size_t /*compaction_readahead_size*/,
+    bool /* allow_unprepared_value */) {
   if (!status().ok()) {
     return NewErrorInternalIterator<Slice>(
         Status::Corruption("CuckooTableReader status is not okay."), arena);