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 |
---|---|---|
adaptive | ||
block_based | ||
cuckoo | ||
plain | ||
block_fetcher.cc | -rw-r--r-- | 11.8 KB |
block_fetcher.h | -rw-r--r-- | 5.1 KB |
block_fetcher_test.cc | -rw-r--r-- | 20.6 KB |
cleanable_test.cc | -rw-r--r-- | 6.4 KB |
format.cc | -rw-r--r-- | 15.0 KB |
format.h | -rw-r--r-- | 12.8 KB |
get_context.cc | -rw-r--r-- | 15.2 KB |
get_context.h | -rw-r--r-- | 8.5 KB |
internal_iterator.h | -rw-r--r-- | 7.7 KB |
iter_heap.h | -rw-r--r-- | 1.3 KB |
iterator.cc | -rw-r--r-- | 6.7 KB |
iterator_wrapper.h | -rw-r--r-- | 4.3 KB |
merger_test.cc | -rw-r--r-- | 4.5 KB |
merging_iterator.cc | -rw-r--r-- | 13.9 KB |
merging_iterator.h | -rw-r--r-- | 2.1 KB |
meta_blocks.cc | -rw-r--r-- | 20.4 KB |
meta_blocks.h | -rw-r--r-- | 6.4 KB |
mock_table.cc | -rw-r--r-- | 10.2 KB |
mock_table.h | -rw-r--r-- | 2.9 KB |
multiget_context.h | -rw-r--r-- | 9.1 KB |
persistent_cache_helper.cc | -rw-r--r-- | 4.3 KB |
persistent_cache_helper.h | -rw-r--r-- | 1.5 KB |
persistent_cache_options.h | -rw-r--r-- | 1.1 KB |
scoped_arena_iterator.h | -rw-r--r-- | 1.6 KB |
sst_file_dumper.cc | -rw-r--r-- | 18.2 KB |
sst_file_dumper.h | -rw-r--r-- | 3.6 KB |
sst_file_reader.cc | -rw-r--r-- | 3.3 KB |
sst_file_reader_test.cc | -rw-r--r-- | 6.7 KB |
sst_file_writer.cc | -rw-r--r-- | 12.2 KB |
sst_file_writer_collectors.h | -rw-r--r-- | 3.1 KB |
table_builder.h | -rw-r--r-- | 8.2 KB |
table_factory.cc | -rw-r--r-- | 1.5 KB |
table_properties.cc | -rw-r--r-- | 11.0 KB |
table_properties_internal.h | -rw-r--r-- | 1.1 KB |
table_reader.h | -rw-r--r-- | 6.4 KB |
table_reader_bench.cc | -rw-r--r-- | 12.8 KB |
table_reader_caller.h | -rw-r--r-- | 1.5 KB |
table_test.cc | -rw-r--r-- | 175.7 KB |
two_level_iterator.cc | -rw-r--r-- | 6.4 KB |
two_level_iterator.h | -rw-r--r-- | 1.7 KB |
Computing file changes ...