Andrew Kryczka
61e324422e
fix thread status synchronization in thread_list_test ( #7825 )
...
Summary:
The test was flaky because the BG threads could increase
`running_count_` up to `job_count_` before applying their thread status
updates. Then the test thread would see non-deterministic results when
counting threads with each status. The fix is to acquire mutex in test
thread so it sees `running_count_` and thread status updated atomically.
I think simply reordering the two updates would have been insufficient
since the thread status update uses `memory_order_relaxed`. This change
happens to also eliminate an undesirable sleep loop.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/7825
Test Plan:
injected sleeps to verify the failure repros before this PR and does not
repro after.
Reviewed By: jay-zhuang
Differential Revision: D25742409
Pulled By: ajkr
fbshipit-source-id: 926a2223fe856e20bc4c0c27df6736ee5cb02c97
2021-01-04 10:46:24 -08:00
..
2020-10-07 12:34:34 -07:00
2020-02-20 12:09:57 -08:00
2020-05-21 14:48:10 -07:00
2020-11-03 12:46:36 -08:00
2020-12-18 14:31:03 -08:00
2019-04-18 10:55:01 -07:00
2017-07-15 16:11:23 -07:00
2020-07-02 19:25:41 -07:00
2020-02-20 12:09:57 -08:00
2020-10-23 14:11:15 -07:00
2020-06-02 15:05:07 -07:00
2020-02-20 12:09:57 -08:00
2020-10-23 14:11:15 -07:00
2020-10-01 12:52:58 -07:00
2020-10-28 23:22:27 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-11-02 19:21:11 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-12-08 13:33:21 -08:00
2020-12-04 15:22:33 -08:00
2020-12-01 11:21:44 -08:00
2019-05-21 16:22:35 -07:00
2020-12-01 11:21:44 -08:00
2020-12-01 11:21:44 -08:00
2020-02-20 12:09:57 -08:00
2020-12-08 15:31:56 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-10-28 23:22:27 -07:00
2020-02-20 12:09:57 -08:00
2020-09-28 11:35:00 -07:00
2020-09-28 11:35:00 -07:00
2020-11-11 08:00:14 -08:00
2020-08-26 10:39:20 -07:00
2020-12-23 16:55:53 -08:00
2020-10-01 09:23:04 -07:00
2020-12-11 22:18:12 -08:00
2020-10-27 10:33:09 -07:00
2020-03-20 14:59:54 -07:00
2020-11-10 23:42:13 -08:00
2020-04-20 13:24:25 -07:00
2020-11-10 23:42:13 -08:00
2020-06-03 15:55:03 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-11-03 12:46:36 -08:00
2020-10-01 09:23:04 -07:00
2020-04-20 13:24:25 -07:00
2020-02-20 12:09:57 -08:00
2020-04-21 13:16:31 -07:00
2019-05-21 16:22:35 -07:00
2020-02-20 12:09:57 -08:00
2020-07-09 14:35:17 -07:00
2020-07-09 14:35:17 -07:00
2020-12-02 15:16:49 -08:00
2020-12-22 23:45:58 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-08-20 08:43:13 -07:00
2020-11-07 17:22:54 -08:00
2020-12-18 14:31:03 -08:00
2020-11-12 20:46:14 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-09-14 16:04:47 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-10-28 23:22:27 -07:00
2020-05-21 10:58:39 -07:00
2021-01-04 10:46:24 -08:00
2020-06-04 11:44:09 -07:00
2020-07-15 09:23:23 -07:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-06-13 13:25:20 -07:00
2020-06-13 13:25:20 -07:00
2017-07-15 16:11:23 -07:00
2020-02-20 12:09:57 -08:00
2020-09-14 17:01:01 -07:00
2020-08-21 15:48:52 -07:00
2020-07-07 17:26:16 -07:00
2020-02-20 12:09:57 -08:00
2020-04-01 16:40:18 -07:00
2020-04-03 10:26:49 -07:00
2020-10-01 09:23:04 -07:00
2020-10-28 23:22:27 -07:00
2019-10-24 17:16:46 -07:00