rocksdb/db
Dhruba Borthakur e5fe80e4e3 The sharding of the block cache is limited to 2*20 pieces.
Summary:
The numbers of shards that the block cache is divided into is
configurable. However, if the user specifies that he/she wants
the block cache to be divided into more than 2**20 pieces, then
the system will rey to allocate a huge array of that size) that
could fail.

It is better to limit the sharding of the block cache to an
upper bound. The default sharding is 16 shards (i.e. 2**4)
and the maximum is now 2 million shards (i.e. 2**20).

Also, fixed a bug with the LRUCache where the numShardBits
should be a private member of the LRUCache object rather than
a static variable.

Test Plan:
run db_bench with --cache_numshardbits=64.

Task ID: #

Blame Rev:

Reviewers: heyongqiang

Reviewed By: heyongqiang

Differential Revision: https://reviews.facebook.net/D5013
2012-08-29 12:17:59 -07:00
..
builder.cc Introduce a new method Env->Fsync() that issues fsync (instead of fdatasync). 2012-08-27 21:24:17 -07:00
builder.h A number of fixes: 2011-10-31 17:22:06 +00:00
c_test.c merge 1.5 2012-08-28 11:43:33 -07:00
c.cc Make some variables configurable for each db instance 2012-06-27 14:36:31 -07:00
corruption_test.cc Make some variables configurable for each db instance 2012-06-27 14:36:31 -07:00
db_bench.cc The sharding of the block cache is limited to 2*20 pieces. 2012-08-29 12:17:59 -07:00
db_impl.cc merge 1.5 2012-08-28 11:43:33 -07:00
db_impl.h Do not spin in a tight loop attempting compactions if there is a compaction error 2012-08-28 11:43:33 -07:00
db_iter.cc A number of fixes: 2011-10-31 17:22:06 +00:00
db_iter.h A number of fixes: 2011-10-31 17:22:06 +00:00
db_statistics.h Fix table-cache size bug, gather table-cache statistics and prevent readahead done by fs. Summary: 2012-05-30 16:42:45 -07:00
db_stats_logger.cc in db_stats_logger.cc, hold mutex_ while accessing versions_ 2012-08-28 11:29:30 -07:00
db_test.cc merge 1.5 2012-08-28 11:43:33 -07:00
dbformat_test.cc A number of fixes: 2011-10-31 17:22:06 +00:00
dbformat.cc Added bloom filter support. 2012-04-17 08:36:46 -07:00
dbformat.h Make some variables configurable for each db instance 2012-06-27 14:36:31 -07:00
filename_test.cc A number of fixes: 2011-10-31 17:22:06 +00:00
filename.cc fix filename_test 2012-08-28 11:42:42 -07:00
filename.h use ts as suffix for LOG.old files 2012-08-17 16:22:04 -07:00
log_format.h A number of fixes: 2011-10-31 17:22:06 +00:00
log_reader.cc A number of fixes: 2011-10-31 17:22:06 +00:00
log_reader.h A number of fixes: 2011-10-31 17:22:06 +00:00
log_test.cc A number of fixes: 2011-10-31 17:22:06 +00:00
log_writer.cc A number of fixes: 2011-10-31 17:22:06 +00:00
log_writer.h A number of fixes: 2011-10-31 17:22:06 +00:00
memtable.cc A number of fixes: 2011-10-31 17:22:06 +00:00
memtable.h A number of fixes: 2011-10-31 17:22:06 +00:00
repair.cc Make some variables configurable for each db instance 2012-06-27 14:36:31 -07:00
skiplist_test.cc A number of fixes: 2011-10-31 17:22:06 +00:00
skiplist.h skiplist: optimize for sequential insert pattern 2012-05-11 09:57:40 -07:00
snapshot.h A number of fixes: 2011-10-31 17:22:06 +00:00
table_cache.cc Fix table-cache size bug, gather table-cache statistics and prevent readahead done by fs. Summary: 2012-05-30 16:42:45 -07:00
table_cache.h Added bloom filter support. 2012-04-17 08:36:46 -07:00
version_edit_test.cc Make some variables configurable for each db instance 2012-06-27 14:36:31 -07:00
version_edit.cc Make some variables configurable for each db instance 2012-06-27 14:36:31 -07:00
version_edit.h Make some variables configurable for each db instance 2012-06-27 14:36:31 -07:00
version_set_test.cc A number of fixes: 2011-10-31 17:22:06 +00:00
version_set.cc merge 1.5 2012-08-28 11:43:33 -07:00
version_set.h merge 1.5 2012-08-28 11:43:33 -07:00
write_batch_internal.h added group commit; drastically speeds up mult-threaded synchronous write workloads 2012-03-08 16:23:21 -08:00
write_batch_test.cc added group commit; drastically speeds up mult-threaded synchronous write workloads 2012-03-08 16:23:21 -08:00
write_batch.cc added group commit; drastically speeds up mult-threaded synchronous write workloads 2012-03-08 16:23:21 -08:00