Revision 869f0538dd541501cb8be8467b00e728f398c8af authored by Yanqin Jin on 17 November 2020, 06:07:29 UTC, committed by Facebook GitHub Bot on 17 November 2020, 06:09:01 UTC
Summary: In db_basic_test.cc, there are two tests that rely on the underlying system's `LockFile` support to function correctly: DBBasicTest.OpenWhenOpen and DBBasicTest.CheckLock. In both tests, re-opening a db using `DB::Open` is expected to fail because the second open cannot lock the LOCK file. Some distributed file systems, e.g. HDFS do not support the POSIX-style file lock. Therefore, these unit tests will cause assertion failure and the second `Open` will create a db instance. Currently, these db instances are not closed after the assertion failure. Since these db instances are registered with some process-wide, static data structures, e.g. `PeriodicWorkScheduler::Default()`, they can still be accessed after the unit tests. However, the `Env` object created for this db instance is destroyed when the test finishes in `~DBTestBase()`. Consequently, it causes illegal memory access. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7682 Test Plan: Run the following on a distrubited file system: ``` make check ``` Reviewed By: anand1976 Differential Revision: D25004215 Pulled By: riversand963 fbshipit-source-id: f4327d7716c0e72b13bb43737ec9a5d156da4d52
1 parent 9627e34
File | Mode | Size |
---|---|---|
.gitignore | -rw-r--r-- | 200 bytes |
CMakeLists.txt | -rw-r--r-- | 1.1 KB |
Makefile | -rw-r--r-- | 2.5 KB |
README.md | -rw-r--r-- | 120 bytes |
c_simple_example.c | -rw-r--r-- | 3.0 KB |
column_families_example.cc | -rw-r--r-- | 2.2 KB |
compact_files_example.cc | -rw-r--r-- | 5.8 KB |
compaction_filter_example.cc | -rw-r--r-- | 3.3 KB |
multi_processes_example.cc | -rw-r--r-- | 11.8 KB |
optimistic_transaction_example.cc | -rw-r--r-- | 5.1 KB |
options_file_example.cc | -rw-r--r-- | 4.1 KB |
rocksdb_option_file_example.ini | -rw-r--r-- | 4.6 KB |
simple_example.cc | -rw-r--r-- | 2.5 KB |
transaction_example.cc | -rw-r--r-- | 5.4 KB |
Computing file changes ...