Revision 58b12dfe37784ce1bd67a03643147ab94f590451 authored by Reid Horuff on 06 March 2017, 23:04:36 UTC, committed by Facebook Github Bot on 06 March 2017, 23:09:11 UTC
Summary:
Relating to #1903:

In MaybeFlushColumnFamilies() we want to modify the 'getting_flushed' flag before releasing the db mutex when SwitchMemtable() is called.

The following 2 actions need to be atomic in MaybeFlushColumnFamilies()
- getting_flushed is false on oldest log
- we determine that all CFs can be flushed to successfully release oldest log
- we set getting_flushed = true on the oldest log.
-------
- getting_flushed is false on oldest log
- we determine that all CFs can NOT be flushed to successfully release oldest log
- we set unable_to_flush_oldest_log_ = true on the oldest log.

#### In the 2pc case:

T1 enters function but is unable to flush all CFs to release log
T1 sets unable_to_flush_oldest_log_ = true
T1 begins flushing all CFs possible

T2 enters function but is unable to flush all CFs to release log
T2 sees unable_to_flush_oldes_log_ has been set so exits

T3 enters function and will be able to flush all CFs to release oldest log
T3 sets getting_flushed = true on oldes
Closes https://github.com/facebook/rocksdb/pull/1909

Differential Revision: D4646235

Pulled By: reidHoruff

fbshipit-source-id: c8d0447
1 parent f8a4ea0
History
File Mode Size
adaptive_table_factory.cc -rw-r--r-- 4.7 KB
adaptive_table_factory.h -rw-r--r-- 1.8 KB
block.cc -rw-r--r-- 14.6 KB
block.h -rw-r--r-- 13.4 KB
block_based_filter_block.cc -rw-r--r-- 8.0 KB
block_based_filter_block.h -rw-r--r-- 4.3 KB
block_based_filter_block_test.cc -rw-r--r-- 7.9 KB
block_based_table_builder.cc -rw-r--r-- 30.5 KB
block_based_table_builder.h -rw-r--r-- 4.9 KB
block_based_table_factory.cc -rw-r--r-- 8.7 KB
block_based_table_factory.h -rw-r--r-- 2.0 KB
block_based_table_reader.cc -rw-r--r-- 77.5 KB
block_based_table_reader.h -rw-r--r-- 17.8 KB
block_builder.cc -rw-r--r-- 4.5 KB
block_builder.h -rw-r--r-- 2.2 KB
block_prefix_index.cc -rw-r--r-- 7.8 KB
block_prefix_index.h -rw-r--r-- 2.2 KB
block_test.cc -rw-r--r-- 16.0 KB
bloom_block.cc -rw-r--r-- 738 bytes
bloom_block.h -rw-r--r-- 1.1 KB
cleanable_test.cc -rw-r--r-- 4.2 KB
cuckoo_table_builder.cc -rw-r--r-- 19.2 KB
cuckoo_table_builder.h -rw-r--r-- 4.6 KB
cuckoo_table_builder_test.cc -rw-r--r-- 26.3 KB
cuckoo_table_factory.cc -rw-r--r-- 2.6 KB
cuckoo_table_factory.h -rw-r--r-- 2.7 KB
cuckoo_table_reader.cc -rw-r--r-- 13.3 KB
cuckoo_table_reader.h -rw-r--r-- 2.8 KB
cuckoo_table_reader_test.cc -rw-r--r-- 19.2 KB
filter_block.h -rw-r--r-- 3.6 KB
flush_block_policy.cc -rw-r--r-- 2.7 KB
format.cc -rw-r--r-- 19.5 KB
format.h -rw-r--r-- 9.4 KB
full_filter_block.cc -rw-r--r-- 3.3 KB
full_filter_block.h -rw-r--r-- 4.1 KB
full_filter_block_test.cc -rw-r--r-- 5.6 KB
get_context.cc -rw-r--r-- 6.0 KB
get_context.h -rw-r--r-- 3.0 KB
index_builder.cc -rw-r--r-- 1.9 KB
index_builder.h -rw-r--r-- 11.1 KB
internal_iterator.h -rw-r--r-- 4.4 KB
iter_heap.h -rw-r--r-- 1.2 KB
iterator.cc -rw-r--r-- 5.9 KB
iterator_wrapper.h -rw-r--r-- 3.2 KB
merger_test.cc -rw-r--r-- 4.3 KB
merging_iterator.cc -rw-r--r-- 11.9 KB
merging_iterator.h -rw-r--r-- 2.1 KB
meta_blocks.cc -rw-r--r-- 13.4 KB
meta_blocks.h -rw-r--r-- 5.0 KB
mock_table.cc -rw-r--r-- 4.4 KB
mock_table.h -rw-r--r-- 5.8 KB
partitioned_filter_block.cc -rw-r--r-- 3.3 KB
partitioned_filter_block.h -rw-r--r-- 2.3 KB
persistent_cache_helper.cc -rw-r--r-- 4.4 KB
persistent_cache_helper.h -rw-r--r-- 1.5 KB
persistent_cache_options.h -rw-r--r-- 1.1 KB
plain_table_builder.cc -rw-r--r-- 9.4 KB
plain_table_builder.h -rw-r--r-- 4.6 KB
plain_table_factory.cc -rw-r--r-- 3.6 KB
plain_table_factory.h -rw-r--r-- 6.9 KB
plain_table_index.cc -rw-r--r-- 7.3 KB
plain_table_index.h -rw-r--r-- 7.1 KB
plain_table_key_coding.cc -rw-r--r-- 17.3 KB
plain_table_key_coding.h -rw-r--r-- 7.4 KB
plain_table_reader.cc -rw-r--r-- 23.4 KB
plain_table_reader.h -rw-r--r-- 8.0 KB
scoped_arena_iterator.h -rw-r--r-- 1.6 KB
sst_file_writer.cc -rw-r--r-- 7.5 KB
sst_file_writer_collectors.h -rw-r--r-- 2.8 KB
table_builder.h -rw-r--r-- 4.7 KB
table_properties.cc -rw-r--r-- 7.5 KB
table_properties_internal.h -rw-r--r-- 1.0 KB
table_reader.h -rw-r--r-- 4.2 KB
table_reader_bench.cc -rw-r--r-- 12.3 KB
table_test.cc -rw-r--r-- 104.0 KB
two_level_iterator.cc -rw-r--r-- 8.2 KB
two_level_iterator.h -rw-r--r-- 2.1 KB

back to top