Description
Currently ns_server passes pretty much all settings to kv (see the function "params(membase," in memcached_bucket_config.erl). These include ones that are not applicable to the type of bucket being created. As an example, backend is set even for ephemeral buckets
{"backend", [], ns_bucket:node_kv_backend_type(BucketConfig)},
|
and
node_kv_backend_type(BucketConfig) ->
|
StorageMode = node_storage_mode(BucketConfig),
|
case StorageMode of
|
couchstore -> couchdb;
|
magma -> magma;
|
%% KV requires a value but only accepts: couchdb, magma, rocksdb.
|
%% So we've always passed couchdb for ephemeral buckets which KV
|
%% will parse as an acceptable value but not use it.
|
ephemeral -> couchdb;
|
%% No storage for memcached buckets
|
undefined -> undefined
|
end.
|
|
It might be nice to specify only applicable settings to kv. MB-61601 is open against kv to do more validation.
Complicating this proposal is the "ensure bucket" that ns_server does. Periodically ns_server asks kv for the settings for a bucket. And if those settings don't match what ns_server has for those settings then the are set again.