Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cspptrie deadlock & cleanups #1

Merged
merged 1 commit into from
Jan 4, 2021
Merged

Conversation

noobpwnftw
Copy link
Contributor

It is incorrect to replace opportunistic locks by unlocking without restoring old locking state.

@royguo This passes your unit test at 8-threads.

Minor cleanups to boost-include and remove one false positive assert.

@royguo
Copy link
Member

royguo commented Dec 28, 2020

Hi, @noobpwnftw , consider the db_bench test here:

./output/db_bench
--benchmarks=fillseq 
--use_existing_db=0 
--sync=0         
--db=$PWD/data_terarkdb     
--wal_dir=$PWD/data_terarkdb        
--bytes_per_sync=65536            
--wal_bytes_per_sync=65536            
--num=1011305            
--threads=10     
--num_levels=6            
--delayed_write_rate=209715200       
--key_size=100          
--value_size=2000       
--cache_numshardbits=6          
--level_compaction_dynamic_level_bytes=true     
--cache_index_and_filter_blocks=1       
--pin_l0_filter_and_index_blocks_in_cache=0     
--benchmark_write_rate_limit=0          
--hard_rate_limit=3     
--rate_limit_delay_max_milliseconds=1000000     
--write_buffer_size=268435456           
--max_write_buffer_number=6     
--target_file_size_base=134217728       
--max_bytes_for_level_base=536870912            
--verify_checksum=1     
--delete_obsolete_files_period_micros=62914560         
--max_bytes_for_level_multiplier=10     
--statistics=0          
--stats_per_interval=1          
--stats_interval_seconds=60     
--histogram=1           
--open_files=-1         
--level0_file_num_compaction_trigger=4          
--level0_slowdown_writes_trigger=1000           
--level0_stop_writes_trigger=1000            
--num_high_pri_threads=3            
--num_low_pri_threads=10
--mmap_read=true            
--compression_type=none            
--memtablerep=patricia_trie                                      
--use_terark_table=false                          
--blob_size=128 
--allow_concurrent_memtable_write=false

If we set allow_concurrent_memtable_write to true, the program will crash on an assertion. Seems something goes wrong inside CSPPTrie. @mm304321141 @levisonchen Please keep an eye on this PR.

@royguo royguo merged commit cc1f63f into bytedance:master Jan 4, 2021
noobpwnftw added a commit to noobpwnftw/terark-zip that referenced this pull request Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants