MCPcopy Create free account
hub / github.com/ElementsProject/elements / ReadFilter

Method ReadFilter

src/leveldb/table/table.cc:113–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void 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
136Table::~Table() { delete rep_; }
137

Callers

nothing calls this directly

Calls 3

ReadBlockFunction · 0.85
DecodeFromMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected