MB-24055: remove defaultNum{Buckets,Locks}, use config.json instead
HashTable defines it's own set of default values for the hash table
initial size and number of locks. This appears to be a remnant of a
time before the central configuration.json we now know and love.
Having both is over-complex and confusing - it might /appear/ that the
default ht_size is 47 (from configuration.json), but in fact the
default is 3 - as hard-coded in hash_table.cc
Given we have config.json now, just use that as the holder of the
default sizes (and which can be overridden by ns_server if
desired). As such HashTable now requires an explicit initialSize and
nLocks in the constructor - which in normal usage will simply come
from the config.
Note that there should be no material change in the values used for
ht_locks or ht_size when run as a full Couchbase Server instance - if
a value is passed in by ns_server (via bucket config string) that will
be used; otherwise the previous values of defaultNum{Buckets,Locks} -
3 and 193 respectively - are used. In unit tests, any previously
overridden values have been updated here to the same values.
Change-Id: I8e3067014714a48acf1954310fdf13dce0b731d7
Reviewed-on: http://review.couchbase.org/77886
Reviewed-by: James Harrison <james.harrison@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Build Bot <build@couchbase.com>