Skip to content

Validate that the backend exists when setting the bucket type option 'backend' #595

@pma

Description

@pma

When creating a bucket type it's possible to set the backend option to one that does not exist.

Later any operation on that bucket type will just hang for a long time before failing, with no clear error. Perhaps its better to just fail, or at least warn, when the bucket type is being created. (tested with a put with the pb erlang client).

Noted: Detected this when I misstyped the backend name as set in the advanced.config file.

riak-admin bucket-type create reference '{"props":{"backend":"leveldb"}}'

advanced.config:

[
  {riak_kv, [
      {multi_backend_default, <<"bitcask">>},
      {multi_backend, [
          {<<"bitcask">>,  riak_kv_bitcask_backend, [
                           {data_root, "/var/lib/riak/bitcask/"},
                           {io_mode, erlang}
          ]},
          {<<"memory">>,  riak_kv_memory_backend, [
                           {max_memory, 100},
                           {ttl, 86400}
          ]},
          {<<"eleveldb">>, riak_kv_eleveldb_backend, [
                           {data_root, "/var/lib/riak/leveldb"},
                           {maximum_memory_percent, 30}
          ]}
      ]}
  ]}
].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions