Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use riak with strongly consistent buckets. #361

Open
fire opened this issue Apr 22, 2017 · 1 comment
Open

Unable to use riak with strongly consistent buckets. #361

fire opened this issue Apr 22, 2017 · 1 comment

Comments

@fire
Copy link

fire commented Apr 22, 2017

How do you use riak with strongly consistent buckets? Errors with {:error, "`undefined` is not a supported type"}

# Create a 3 node riak cluster
riak-admin bucket-type create strongly_consistent \ 
  '{"props":{"consistent":true}}'
riak-admin bucket-type activate strongly_consistent
# Test if the cluster is working
curl -v 172.17.0.2:8098/types/strongly_consistent/buckets/test/keys/hello \
  -X PUT \
  -H "Content-type: text/plain" \
  -d "world"
curl -v 172.17.0.2:8098/types/strongly_consistent/buckets/test/keys/hello
# Elixir
{:ok, pid} = Riak.Connection.start_link('172.17.0.2', 8087)
{:ok, #PID<0.399.0>}
iex(3)> :riakc_pb_socket.fetch_type(pid, {"strongly_consistent", "test"}, "hello")
{:error, "`undefined` is not a supported type"}
@fire
Copy link
Author

fire commented Apr 22, 2017

Weird, but

iex(7)> :riakc_pb_socket.get(pid, {"strongly_consistent", "test"}, "hello")
{:ok,
 {:riakc_obj, {"strongly_consistent", "test"}, "hello",
  <<107, 206, 97, 96, 96, 96, 204, 96, 74, 97, 96, 73, 45, 78, 45, 204, 96,
    202, 99, 101, 112, 0, 9, 1, 105, 198, 179, 249, 151, 248, 178, 0>>,
  [{{:dict, 3, 16, 16, 8, 80, 48,
     {[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []},
     {{[], [], [], [], [], [], [], [], [], [],
       [["content-type", 116, 101, 120, 116, 47, 112, 108, 97, 105, 110],
        ["X-Riak-VTag", 51, 66, 120, 87, 50, 84, 53, 68, 117, 97, 117, 71,
         72, 85, 89, 101, 80, 55, 65, 109, 109, 118]], [], [],
       [["X-Riak-Last-Modified" | {1492, 865281, 773593}]], [], []}}},
    "world"}], :undefined, :undefined}}

works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant