13
13
#include " rocksdb/filter_policy.h"
14
14
#include " table/block_based/block.h"
15
15
#include " table/block_based/block_based_table_reader.h"
16
+ #include " test_util/testharness.h"
16
17
#include " util/coding.h"
17
18
18
19
namespace ROCKSDB_NAMESPACE {
@@ -143,6 +144,7 @@ std::unique_ptr<FilterBlockReader> PartitionedFilterBlockReader::Create(
143
144
use_cache, nullptr /* get_context */ ,
144
145
lookup_context, &filter_block);
145
146
if (!s.ok ()) {
147
+ IGNORE_STATUS_IF_ERROR (s);
146
148
return std::unique_ptr<FilterBlockReader>();
147
149
}
148
150
@@ -254,7 +256,7 @@ bool PartitionedFilterBlockReader::MayMatch(
254
256
Status s =
255
257
GetOrReadFilterBlock (no_io, get_context, lookup_context, &filter_block);
256
258
if (UNLIKELY (!s.ok ())) {
257
- TEST_SYNC_POINT ( " FilterReadError " );
259
+ IGNORE_STATUS_IF_ERROR (s );
258
260
return true ;
259
261
}
260
262
@@ -272,7 +274,7 @@ bool PartitionedFilterBlockReader::MayMatch(
272
274
no_io, get_context, lookup_context,
273
275
&filter_partition_block);
274
276
if (UNLIKELY (!s.ok ())) {
275
- TEST_SYNC_POINT ( " FilterReadError " );
277
+ IGNORE_STATUS_IF_ERROR (s );
276
278
return true ;
277
279
}
278
280
@@ -312,7 +314,7 @@ void PartitionedFilterBlockReader::CacheDependencies(bool pin) {
312
314
" Error retrieving top-level filter block while trying to "
313
315
" cache filter partitions: %s" ,
314
316
s.ToString ().c_str ());
315
- TEST_SYNC_POINT ( " FilterReadError " );
317
+ IGNORE_STATUS_IF_ERROR (s );
316
318
return ;
317
319
}
318
320
@@ -343,11 +345,6 @@ void PartitionedFilterBlockReader::CacheDependencies(bool pin) {
343
345
prefetch_buffer.reset (new FilePrefetchBuffer ());
344
346
s = prefetch_buffer->Prefetch (rep->file .get (), prefetch_off,
345
347
static_cast <size_t >(prefetch_len));
346
- #ifndef NDEBUG
347
- if (!s.ok ()) {
348
- TEST_SYNC_POINT (" FilterReadError" );
349
- }
350
- #endif
351
348
352
349
// After prefetch, read the partitions one by one
353
350
ReadOptions read_options;
@@ -370,11 +367,7 @@ void PartitionedFilterBlockReader::CacheDependencies(bool pin) {
370
367
}
371
368
}
372
369
}
373
- #ifndef NDEBUG
374
- if (!s.ok ()) {
375
- TEST_SYNC_POINT (" FilterReadError" );
376
- }
377
- #endif
370
+ IGNORE_STATUS_IF_ERROR (s);
378
371
}
379
372
}
380
373
0 commit comments