| 111 | } |
| 112 | |
| 113 | void Table::ReadFilter(const Slice& filter_handle_value) { |
| 114 | Slice v = filter_handle_value; |
| 115 | BlockHandle filter_handle; |
| 116 | if (!filter_handle.DecodeFrom(&v).ok()) { |
| 117 | return; |
| 118 | } |
| 119 | |
| 120 | // We might want to unify with ReadBlock() if we start |
| 121 | // requiring checksum verification in Table::Open. |
| 122 | ReadOptions opt; |
| 123 | if (rep_->options.paranoid_checks) { |
| 124 | opt.verify_checksums = true; |
| 125 | } |
| 126 | BlockContents block; |
| 127 | if (!ReadBlock(rep_->file, opt, filter_handle, &block).ok()) { |
| 128 | return; |
| 129 | } |
| 130 | if (block.heap_allocated) { |
| 131 | rep_->filter_data = block.data.data(); // Will need to delete later |
| 132 | } |
| 133 | rep_->filter = new FilterBlockReader(rep_->options.filter_policy, block.data); |
| 134 | } |
| 135 | |
| 136 | Table::~Table() { delete rep_; } |
| 137 |
nothing calls this directly
no test coverage detected