basho-labs / riak-c-client

Riak C Client
Apache License 2.0
20 stars 8 forks source link

Request for initial review: Bucket types #66

Closed bookshelfdave closed 10 years ago

bookshelfdave commented 10 years ago

Add a bucket type parameter to the following PB message:

Additionally, all references to 2index were changes to 2i. Perhaps this should have been done on a separate PR, but I needed up update 2i code anyways. Sorry for the noise this creates in the PR.

I'd like to talk w/ @javajolt a bit more re: integration testing of each message, which I'll add in a later commit (hence the "request for initial review"). For now, existing integration tests take a NULL bucket type, indicating the default bucket.

hazen commented 10 years ago

I asked in Eng:Clients and found that bucket types are higher order namespaces than buckets. So I would order your arguments/storage: bucket type, bucket, key, i.e., type before bucket across the board

hazen commented 10 years ago

We'll probably want to have integration tests with bucket types and without. Since we cannot setup the bucket type within the client, we still need to figure out the test setup to make that happen.

hazen commented 10 years ago

Weirdly the integration test cored on 2.0.0.pre11, but work fine on 2.0.0pre18.

hazen commented 10 years ago

@metadave - How about we merge this to get the 2i naming changes in and the initial bucket type changes in? We can reorder the parameters in the next PR and add more tests.

bookshelfdave commented 10 years ago

@javajolt test_integration_async_listkeys is coredumping somehow, it looks like riak_listkeys_request_encode is getting a non-NULL bucket_type

hazen commented 10 years ago

Which Riak version are you testing against?

bookshelfdave commented 10 years ago

develop, but I think the bug is somewhere in the test code.

hazen commented 10 years ago

Agreed. Should not core. However, I ran the tests and got the segfault, now the 2.0.0pre18 node I was talking to became unresponsive:

curl http://127.0.0.1:10018/buckets?buckets=true
curl: (7) couldn't connect to host