rocksdb/file
Changyu Bi b800b5eb6a Deflake ThreadStatus related unit tests (#12858)
Summary:
Unit tests `DBTest.ThreadStatusFlush` and `DBTestWithParam.ThreadStatusSingleCompaction` have been flaky and fail with error message
```
[ RUN      ] DBTest.ThreadStatusFlush
op_count: 0, expected_count 1
thread id: 718113, thread status: , cf_name
thread id: 718114, thread status: , cf_name pikachu
/__w/rocksdb/rocksdb/db/db_test.cc:4817: Failure
Value of: VerifyOperationCount(env_, ThreadStatus::OP_FLUSH, 1)
  Actual: false
Expected: true
[  FAILED  ] DBTest.ThreadStatusFlush (106 ms)

[ RUN      ] DBTestWithParam/DBTestWithParam.ThreadStatusSingleCompaction/0
db/db_test.cc:4673: Failure
Expected equality of these values:
  op_count
    Which is: 0
  expected_count
    Which is: 1
[  FAILED  ] DBTestWithParam/DBTestWithParam.ThreadStatusSingleCompaction/0, where GetParam() = (1, false)
```

One cause for this is that before flush/compaction finishes, we will go through `~WritableFileWriter()`, either for WAL or SST file, and temporarily set thread_operation to UNKNOWN. This UNKNOWN thread operation seem to be there for some stress test verification. This PR fixes these tests by setting the IOActivity in ~WritableFileWriter() for debug build.

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

Test Plan: monitor future test failure.

Reviewed By: hx235

Differential Revision: D59691564

Pulled By: cbi42

fbshipit-source-id: 3f96998bba9d42aba50d1830c2b51bef2dd6705f
2024-07-15 09:56:09 -07:00
..
delete_scheduler.cc Fix delete obsolete files on recovery not rate limited (#12590) 2024-05-01 12:26:54 -07:00
delete_scheduler.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
delete_scheduler_test.cc Prefer static_cast in place of most reinterpret_cast (#12308) 2024-02-07 10:44:11 -08:00
file_prefetch_buffer.cc Change ReadAsync callback API to remove const from FSReadRequest (#11649) 2024-02-16 09:14:55 -08:00
file_prefetch_buffer.h Change ReadAsync callback API to remove const from FSReadRequest (#11649) 2024-02-16 09:14:55 -08:00
file_util.cc Fix Checkpoint hard link of inactive but unsynced WAL (#12731) 2024-06-05 17:40:09 -07:00
file_util.h Fix delete obsolete files on recovery not rate limited (#12590) 2024-05-01 12:26:54 -07:00
filename.cc Group SST write in flush, compaction and db open with new stats (#11910) 2023-12-29 15:29:23 -08:00
filename.h Remove unnecessary, confusing 'extern' (#12300) 2024-01-29 10:38:08 -08:00
line_file_reader.cc Support read rate-limiting in SequentialFileReader (#9973) 2022-05-24 10:28:57 -07:00
line_file_reader.h Support read rate-limiting in SequentialFileReader (#9973) 2022-05-24 10:28:57 -07:00
prefetch_test.cc Respect ReadOptions::read_tier in prefetching (#12782) 2024-06-19 09:53:59 -07:00
random_access_file_reader.cc default_write_temperature option (#12388) 2024-02-28 14:36:13 -08:00
random_access_file_reader.h Change ReadAsync callback API to remove const from FSReadRequest (#11649) 2024-02-16 09:14:55 -08:00
random_access_file_reader_test.cc internal_repo_rocksdb (4372117296613874540) (#12117) 2023-12-04 11:17:32 -08:00
read_write_util.cc Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
read_write_util.h Remove unnecessary, confusing 'extern' (#12300) 2024-01-29 10:38:08 -08:00
readahead_file_info.h Reuse internal auto readhead_size at each Level (expect L0) for Iterations (#9056) 2021-11-10 16:20:04 -08:00
readahead_raf.cc Change internal headers with duplicate names (#11408) 2023-05-17 11:27:09 -07:00
readahead_raf.h Make StringEnv, StringSink, StringSource use FS classes (#7786) 2021-01-04 16:01:01 -08:00
sequence_file_reader.cc Retry DB::Open upon a corruption detected while reading the MANIFEST (#12518) 2024-04-18 17:36:33 -07:00
sequence_file_reader.h Retry DB::Open upon a corruption detected while reading the MANIFEST (#12518) 2024-04-18 17:36:33 -07:00
sst_file_manager_impl.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
sst_file_manager_impl.h Fix delete obsolete files on recovery not rate limited (#12590) 2024-05-01 12:26:54 -07:00
writable_file_writer.cc Inject more errors to more files in stress test (#12713) 2024-06-19 08:42:00 -07:00
writable_file_writer.h Deflake ThreadStatus related unit tests (#12858) 2024-07-15 09:56:09 -07:00