-
Notifications
You must be signed in to change notification settings - Fork 233
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
PB codec for get_coverage [2/3] #1397
Conversation
* rows as tuples, not lists of cells; * [] for undefined.
dcad486
to
2bb5e6a
Compare
relies on the code moved from riak_kv_ts_svc over to riak_pb_ts_codec.
2bb5e6a
to
3cb7eb1
Compare
Bucket = riak_kv_ts_util:table_to_bucket(Table), | ||
Client = {riak_client, [node(), undefined]}, | ||
convert_cover_list(sql_to_cover(Client, Queries, Bucket, []), State) | ||
?E_BAD_QUERY, flat_format("Failed to parse query: ~p", [Reason])), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using ~p
means this message will always look really bad, if it is a string it will speech marks it will have all the bracks. If I force a parsing error in riak_test I get this.
================ ts_cluster_coverage failure stack trace =====================
{{badmatch,{error,{1018,
<<"Failed to parse query: {<<\"selectah\">>,riak_ql_parser,\n [\"syntax error before: \",\"identifier"]}">>}}},
[{ts_cluster_coverage,test_quanta_range,5,
[{file,"tests/ts_cluster_coverage.erl"},{line,54}]},
{ts_cluster_coverage,confirm,0,
[{file,"tests/ts_cluster_coverage.erl"},{line,45}]},
{riak_test_runner,return_to_exit,3,
[{file,"src/riak_test_runner.erl"},{line,196}]}]}
==============================================================================
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A proper error retval matching is in order. I did this for the main tsqueryreq case; time to fix it here, too.
+1 2ad8f53 |
PB codec for get_coverage [2/3] Reviewed-by: andytill
@borshop merge |
This is Part 2/3 of #1382 broken up and reassembled into new commits.
Requires (includes) #1396 and basho/riak_pb#190.
This PR removes the code assembling
#tscoverageresp
from riak_kv, to be added in the linked riak_pb PR. The callbacks in the common module serving both PB and TTB messages need to only ever return plain Erlang terms. For PB messages, appropriate codecs will be used (from riak_pb_ts_codec), while TTB messages are transmitted (as if) without any conversion.