Skip to content

TicTacAAE folds do not need default bucket #279

@Bob-The-Marauder

Description

@Bob-The-Marauder

From https://www.tiot.jp/riak-docs/riak/kv/2.9.10/using/cluster-operations/tictac-aae-fold/object-stats/ the example for object stats of:

riak_client:aae_fold({
    object_stats,
    {<<"animals">>,<<"dogs">>},
    {<<"A">>,<<"N">>},
    {date,1640995200,1643673600}
    }, Client).

shows that we need both the bucket type of animals and the bucket name of dogs. However, when I tried this for an example where only the default bucket type had been used, it failed. By removing the bucket type though, it worked:

([email protected])7> riak_client:aae_fold({object_stats, {<<"default">>,<<"car">>}, all, all}, Client).
{ok,[{total_count,0},
     {total_size,0},
     {sizes,[]},
     {siblings,[]}]}
([email protected])8> riak_client:aae_fold({object_stats, <<"car">>, all, all}, Client).
{ok,[{total_count,1},
     {total_size,535},
     {sizes,[{2,1}]},
     {siblings,[{1,1}]}]}

Although I understand being able to omit the default bucket type would allow buckets of the default type to work with this, I am confused as to why it does not work when the default bucket type is specified as default.

For refrence:

curl http://192.168.56.101:8098/types/default/buckets/car/keys/viper
vroom
curl http://192.168.56.101:8098/buckets/car/keys/viper
vroom

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