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 |
---|---|---|
auto_roll_logger.cc | -rw-r--r-- | 9.2 KB |
auto_roll_logger.h | -rw-r--r-- | 4.8 KB |
auto_roll_logger_test.cc | -rw-r--r-- | 24.2 KB |
env_logger.h | -rw-r--r-- | 4.6 KB |
env_logger_test.cc | -rw-r--r-- | 4.2 KB |
event_logger.cc | -rw-r--r-- | 2.0 KB |
event_logger.h | -rw-r--r-- | 4.9 KB |
event_logger_test.cc | -rw-r--r-- | 1.2 KB |
log_buffer.cc | -rw-r--r-- | 2.4 KB |
log_buffer.h | -rw-r--r-- | 1.8 KB |
logging.h | -rw-r--r-- | 3.2 KB |
posix_logger.h | -rw-r--r-- | 5.3 KB |
Computing file changes ...