Yanqin Jin
3514cf51fa
Fix data race to VersionSet::io_status_ ( #7034 )
...
Summary:
After https://github.com/facebook/rocksdb/issues/6949 , VersionSet::io_status_ can be concurrently accessed by multiple
threads without lock, causing tsan test to fail. For example, a bg flush thread
resets io_status_ before calling LogAndApply(), while another thread already in
the process of LogAndApply() reads io_status_. This is a bug.
We do not have to reset io_status_ each time we call LogAndApply(). io_status_
is part of the state of VersionSet, and it indicates the outcome of preceding
MANIFEST/CURRENT files IO operations. Its value should be updated only when:
1. MANIFEST/CURRENT files IO fail for the first time.
2. MANIFEST/CURRENT files IO succeed as part of recovering from a prior
failure without process restart, e.g. calling Resume().
Test Plan (devserver):
COMPILE_WITH_TSAN=1 make check
COMPILE_WITH_TSAN=1 make db_test2
./db_test2 --gtest_filter=DBTest2.CompactionStall
Pull Request resolved: https://github.com/facebook/rocksdb/pull/7034
Reviewed By: zhichao-cao
Differential Revision: D22247137
Pulled By: riversand963
fbshipit-source-id: 77b83e05390f3ee3cd2d96d3fdd6fe4f225e3216
2020-07-09 15:51:01 -07:00
..
2020-06-23 14:13:48 -07:00
2020-07-09 15:51:01 -07:00
2020-07-09 15:51:01 -07:00
2020-06-18 10:43:00 -07:00
2020-03-06 16:24:27 -08:00
2020-06-09 16:51:23 -07:00
2020-03-27 16:04:43 -07:00
2020-06-03 17:08:50 -07:00
2020-06-03 17:08:50 -07:00
2020-06-03 15:55:03 -07:00
2020-03-20 19:30:48 -07:00
2020-03-20 19:30:48 -07:00
2020-02-20 12:09:57 -08:00
2020-03-02 16:01:00 -08:00
2020-02-20 12:09:57 -08:00
2020-06-03 15:55:03 -07:00
2020-05-12 18:23:33 -07:00
2020-06-05 11:08:25 -07:00
2020-02-20 12:09:57 -08:00
2020-07-09 15:50:33 -07:00
2020-06-02 15:05:07 -07:00
2020-06-03 15:55:03 -07:00
2020-06-03 15:55:03 -07:00
2020-06-09 16:51:23 -07:00
2020-04-20 13:24:25 -07:00
2020-02-20 12:09:57 -08:00
2020-07-09 15:50:33 -07: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-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-05-28 10:40:03 -07:00
2020-04-10 09:51:58 -07:00
2020-06-03 15:55:03 -07:00
2020-02-20 12:09:57 -08:00
2020-03-20 15:26:10 -07:00
2020-03-02 16:01:00 -08:00
2020-02-20 12:09:57 -08:00
2020-06-03 15:55:03 -07:00
2020-04-30 17:01:17 -07:00
2020-02-20 12:09:57 -08:00
2020-06-02 15:05:07 -07:00
2020-06-05 09:43:04 -07:00
2020-02-20 12:09:57 -08:00
2020-06-03 15:55:03 -07:00
2020-02-20 12:09:57 -08:00
2020-07-09 15:48:54 -07:00
2020-05-05 13:11:29 -07:00
2020-05-05 13:11:29 -07:00
2020-07-09 15:50:33 -07:00
2020-06-03 15:55:03 -07:00
2020-05-05 15:04:04 -07:00
2020-06-03 15:55:03 -07:00
2020-04-10 16:05:49 -07:00
2020-06-03 15:55:03 -07:00
2020-02-20 12:09:57 -08:00
2020-05-28 10:40:03 -07:00
2020-05-28 10:40:03 -07:00
2020-02-20 12:09:57 -08:00
2020-04-03 10:26:49 -07:00
2020-07-09 15:50:33 -07:00
2020-03-27 16:04:43 -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-06-11 14:27:36 -07:00
2020-06-11 14:27:36 -07:00
2020-06-11 14:27:36 -07:00
2020-06-03 15:55:03 -07: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-02-20 12:09:57 -08:00
2020-04-07 16:00:26 -07:00
2020-03-31 12:11:42 -07:00
2020-03-27 16:04:43 -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-06-09 16:51:23 -07:00
2020-04-15 17:40:44 -07:00
2020-04-30 08:40:42 -07:00
2020-02-20 12:09:57 -08:00
2020-06-10 14:04:07 -07:00
2020-07-09 15:50:33 -07:00
2020-02-20 12:09:57 -08:00
2020-05-04 15:08:13 -07:00
2020-03-12 11:00:56 -07:00
2020-02-20 12:09:57 -08:00
2020-06-11 18:42:10 -07:00
2020-04-20 11:39:31 -07:00
2020-06-03 15:55:03 -07:00
2020-06-18 10:38:16 -07:00
2020-03-27 16:04:43 -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-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-03-04 20:15:25 -08:00
2020-03-27 16:04:43 -07:00
2020-07-09 15:51:01 -07:00
2020-06-04 15:46:27 -07:00
2020-05-28 10:40:03 -07:00
2020-03-02 16:01:00 -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-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-05-07 09:32:51 -07:00
2020-02-20 12:09:57 -08:00
2020-04-20 13:24:25 -07:00
2020-02-20 12:09:57 -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-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-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-06-09 16:51:23 -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-06-09 16:51:23 -07:00
2020-06-09 16:51:23 -07: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-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-06-12 09:54:39 -07:00
2020-06-12 09:54:39 -07:00
2020-06-09 16:51:23 -07:00
2020-06-18 10:38:16 -07:00
2020-06-18 10:38:16 -07:00
2020-03-23 10:27:47 -07:00
2020-06-07 21:56:55 -07:00
2020-06-07 21:56:55 -07:00
2020-06-08 16:01:59 -07:00
2020-07-09 15:51:01 -07:00
2020-07-09 15:51:01 -07:00
2020-02-20 12:09:57 -08:00
2020-04-29 13:09:23 -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-02-20 12:09:57 -08:00
2020-05-28 10:40: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-02-20 12:09:57 -08:00
2020-02-20 12:09:57 -08:00
2020-02-28 14:14:03 -08:00
2020-02-20 12:09:57 -08:00