Revision 3df07d1703297cf8bf98327c1dc65f48d18957f5 authored by sdong on 19 May 2014, 17:40:18 UTC, committed by sdong on 19 May 2014, 18:52:12 UTC
Summary: Add a feature to decrease the number of threads in thread pool. Also instantly schedule more threads if number of threads is increased. Here is the way it is implemented: each background thread needs its thread ID. After decreasing number of threads, all threads are woken up. The thread with the largest thread ID will terminate. If there are more threads to terminate, the thread will wake up all threads again. Another change is made so that when number of threads is increased, more threads are created and all previous excessive threads are woken up to do the work. Test Plan: Add a unit test. Reviewers: haobo, dhruba Reviewed By: haobo CC: yhchiang, igor, nkg-, leveldb Differential Revision: https://reviews.facebook.net/D18675
1 parent 1e56045
File | Mode | Size |
---|---|---|
auto_sanity_test.sh | -rwxr-xr-x | 2.1 KB |
blob_store_bench.cc | -rw-r--r-- | 7.5 KB |
db_crashtest.py | -rw-r--r-- | 4.8 KB |
db_crashtest2.py | -rw-r--r-- | 5.7 KB |
db_repl_stress.cc | -rw-r--r-- | 4.2 KB |
db_sanity_test.cc | -rw-r--r-- | 5.6 KB |
db_stress.cc | -rw-r--r-- | 58.0 KB |
ldb.cc | -rw-r--r-- | 424 bytes |
ldb_test.py | -rw-r--r-- | 17.0 KB |
reduce_levels_test.cc | -rw-r--r-- | 4.9 KB |
sst_dump.cc | -rw-r--r-- | 11.0 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...