rocksdb/env
Andrew Kryczka 1f32dc7d2b Check with PosixEnv before opening LOCK file (#3993)
Summary:
Rebased and resubmitting #1831 on behalf of stevelittle.

The problem is when a single process attempts to open the same DB twice, the second attempt fails due to LOCK file held. If the second attempt had opened the LOCK file, it'll now need to close it, and closing causes the file to be unlocked. Then, any subsequent attempt to open the DB will succeed, which is the wrong behavior.

The solution was to track which files a process has locked in PosixEnv, and check those before opening a LOCK file.

Fixes #1780.
Closes https://github.com/facebook/rocksdb/pull/3993

Differential Revision: D8398984

Pulled By: ajkr

fbshipit-source-id: 2755fe66950a0c9de63075f932f9e15768041918
2018-06-13 17:32:04 -07:00
..
env_basic_test.cc Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
env_chroot.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
env_chroot.h Change RocksDB License 2017-07-15 16:11:23 -07:00
env_encryption.cc Fix some typos in comments and docs. 2018-03-08 10:27:25 -08:00
env_hdfs.cc Disallow compactions if there isn't enough free space 2018-03-06 16:27:54 -08:00
env_posix.cc Check with PosixEnv before opening LOCK file (#3993) 2018-06-13 17:32:04 -07:00
env_test.cc Catchup with posix features 2018-05-24 15:13:04 -07:00
env.cc Apply use_direct_io_for_flush_and_compaction to writes only 2018-05-09 19:42:58 -07:00
io_posix.cc Fix Fadvise on closed file when reads use mmap 2018-05-25 10:57:57 -07:00
io_posix.h Second attempt at db_stress crash-recovery verification 2018-04-30 12:27:34 -07:00
mock_env_test.cc Move some files under util/ to separate dirs 2017-04-05 19:09:16 -07:00
mock_env.cc Add virtual Truncate method to Env 2018-04-26 21:12:51 -07:00
mock_env.h Add virtual Truncate method to Env 2018-04-26 21:12:51 -07:00
posix_logger.h Disallow compactions if there isn't enough free space 2018-03-06 16:27:54 -08:00