rocksdb/include/rocksdb
Andrew Kryczka 782fcc44e1 Fix race condition in error_handler_fs_test (#9325)
Summary:
We saw the below assertion failure in `error_handler_fs_test`:

```
db/error_handler_fs_test.cc:2471: Failure
Expected equality of these values:
  listener->new_bg_error()
    Which is: 16-byte object <00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00>
  Status::Aborted()
    Which is: 16-byte object <0A-00 00-00 60-61 00-00 00-00 00-00 00-00 00-00>
terminate called after throwing an instance of 'testing::internal::GoogleTestFailureException'
  what():  db/error_handler_fs_test.cc:2471: Failure
Expected equality of these values:
  listener->new_bg_error()
    Which is: 16-byte object <00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00>
  Status::Aborted()
    Which is: 16-byte object <0A-00 00-00 60-61 00-00 00-00 00-00 00-00 00-00>
Received signal 6 (Aborted)
```

The problem was completing `OnErrorRecoveryCompleted()` would
wake up the main thread and allow it to proceed to that assertion. But
that assertion assumes `OnErrorRecoveryEnd()` has completed since
only `OnErrorRecoveryEnd()` affects `new_bg_error()`.

The fix is just to make `OnErrorRecoveryCompleted()` not wake up the
main thread, by means of not implementing it.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9325

Test Plan:
- ran `while TEST_TMPDIR=/dev/shm ./error_handler_fs_test ; do : ; done` for a while
- injected sleep between `OnErrorRecovery{Completed,End}()` callbacks, which guaranteed repro before this PR

Reviewed By: anand1976

Differential Revision: D33249200

Pulled By: ajkr

fbshipit-source-id: 1659ee183cd09f90d4dbd898f65103473fcf84a8
2021-12-20 23:16:52 -08:00
..
utilities Some API clarifications (#9080) 2021-11-02 20:30:07 -07:00
advanced_options.h Support readahead during compaction for blob files (#9187) 2021-11-19 17:53:47 -08:00
c.h Add rocksdb_livefiles_column_family_name C API (#9232) 2021-11-30 16:54:27 -08:00
cache_bench_tool.h Allow cache_bench/db_bench to use a custom secondary cache (#8312) 2021-05-19 15:26:18 -07:00
cache.h Some API clarifications (#9080) 2021-11-02 20:30:07 -07:00
cleanable.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
compaction_filter.h Fix compile warnings (#9199) 2021-11-24 11:19:06 -08:00
compaction_job_stats.h Update compaction statistics to include the amount of data read from blob files (#8022) 2021-03-04 00:43:48 -08:00
comparator.h Fix compile warnings (#9199) 2021-11-24 11:19:06 -08:00
compression_type.h Move CompressionType to its own header file (#7162) 2020-08-03 15:49:31 -07:00
concurrent_task_limiter.h Some API clarifications (#9080) 2021-11-02 20:30:07 -07:00
configurable.h Make WalFilter, SstPartitionerFactory, FileChecksumGenFactory, and TableProperties Customizable (#8638) 2021-09-28 05:32:02 -07:00
convenience.h Add ObjectRegistry to ConfigOptions (#8166) 2021-05-11 06:47:22 -07:00
customizable.h Fix GetOptionsPtr for Wrapped Customizable; Allow null options map (#9213) 2021-11-30 13:23:25 -08:00
data_structure.h Add (Live)FileStorageInfo API (#8968) 2021-10-16 10:04:32 -07:00
db_bench_tool.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db_dump_tool.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db_stress_tool.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db.h Support GetMapProperty() with "rocksdb.dbstats" (#9057) 2021-10-20 13:17:00 -07:00
env_encryption.h Some API clarifications (#9080) 2021-11-02 20:30:07 -07:00
env.h Some API clarifications (#9080) 2021-11-02 20:30:07 -07:00
experimental.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
file_checksum.h Fix compile warnings (#9199) 2021-11-24 11:19:06 -08:00
file_system.h Fix backward compatibility breakage in FileSystemWrapper (#9156) 2021-11-11 17:59:18 -08:00
filter_policy.h Add Bloom/Ribbon hybrid API support (#8679) 2021-08-20 18:00:16 -07:00
flush_block_policy.h Some API clarifications (#9080) 2021-11-02 20:30:07 -07:00
functor_wrapper.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
io_status.h Add a new IOStatus subcode to indicate that writes are fenced off (#7374) 2020-09-14 16:04:47 -07:00
iostats_context.h Add file temperature related counter and bytes stats to and io_stats (#8710) 2021-10-07 14:58:41 -07:00
iterator.h Enable backward iterator for keys with user-defined timestamp (#8035) 2021-03-10 11:15:46 -08:00
ldb_tool.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
listener.h Fix race condition in error_handler_fs_test (#9325) 2021-12-20 23:16:52 -08:00
memory_allocator.h Make MemoryAllocator into a Customizable class (#8980) 2021-12-17 04:20:47 -08:00
memtablerep.h Fix compile warnings (#9199) 2021-11-24 11:19:06 -08:00
merge_operator.h Fix compile warnings (#9199) 2021-11-24 11:19:06 -08:00
metadata.h Add (Live)FileStorageInfo API (#8968) 2021-10-16 10:04:32 -07:00
options.h Deprecating iter_start_seqnum and preserve_deletes (#9091) 2021-11-19 16:55:45 -08:00
perf_context.h Add a PerfContext counter for secondary cache hits (#8685) 2021-08-20 15:17:30 -07:00
perf_level.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
persistent_cache.h Check for and disallow shared key space in block caches (#9172) 2021-11-16 11:16:05 -08:00
rate_limiter.h Make RateLimiter Customizable (#9141) 2021-12-01 06:57:02 -08:00
rocksdb_namespace.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
secondary_cache.h Fix compile warnings (#9199) 2021-11-24 11:19:06 -08:00
slice_transform.h Fix compile warnings (#9199) 2021-11-24 11:19:06 -08:00
slice.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
snapshot.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
sst_dump_tool.h Add --version and --help to ldb and sst_dump (#6951) 2020-06-09 10:04:01 -07:00
sst_file_manager.h Some API clarifications (#9080) 2021-11-02 20:30:07 -07:00
sst_file_reader.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
sst_file_writer.h Support timestamps in SstFileWriter (#8899) 2021-09-09 18:58:01 -07:00
sst_partitioner.h Fix compile warnings (#9199) 2021-11-24 11:19:06 -08:00
statistics.h Add tiered storage related read bytes stats to Statistic (#9123) 2021-11-16 15:17:17 -08:00
stats_history.h More refactoring ahead of footer & meta changes (#9240) 2021-12-10 08:13:26 -08:00
status.h Fix small issues (#5896) 2021-11-08 12:32:38 -08:00
system_clock.h Fix compile warnings (#9199) 2021-11-24 11:19:06 -08:00
table_properties.h Replace TableProperties::properties_offsets map with external_sst_file_global_seqno_offset (#9212) 2021-12-02 08:30:36 -08:00
table.h More refactoring ahead of footer & meta changes (#9240) 2021-12-10 08:13:26 -08:00
thread_status.h Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
threadpool.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
trace_reader_writer.h Update comments, fix typos. (#8721) 2021-08-27 13:16:32 -07:00
trace_record_result.h Add IteratorTraceExecutionResult for iterator related trace records. (#8687) 2021-08-20 15:35:56 -07:00
trace_record.h Add IteratorTraceExecutionResult for iterator related trace records. (#8687) 2021-08-20 15:35:56 -07:00
transaction_log.h Replace most typedef with using= (#8751) 2021-09-07 11:31:59 -07:00
types.h Expose blob file information through the EventListener interface (#8675) 2021-09-16 17:23:36 -07:00
unique_id.h Experimental support for SST unique IDs (#8990) 2021-10-18 23:32:01 -07:00
universal_compaction.h Incremental Space Amp Compactions in Universal Style (#8655) 2021-10-20 10:04:13 -07:00
version.h Update to version 6.28 (#9312) 2021-12-17 16:20:39 -08:00
wal_filter.h Fix compile warnings (#9199) 2021-11-24 11:19:06 -08:00
write_batch_base.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
write_batch.h Fix link error reported in issue 9272 (#9278) 2021-12-10 20:33:46 -08:00
write_buffer_manager.h Minor improvement to CacheReservationManager/WriteBufferManager/CompressionDictBuilding (#9139) 2021-11-05 16:13:47 -07:00