Skip to content

Conversation

@hazen
Copy link

@hazen hazen commented May 5, 2016

This issue was found when running the riak_demo for time series. Basically create table was handing back an empty query response.

RiakErrorTraceback (most recent call last)
<ipython-input-3-23aaf27844ac> in <module>()
     14             )
     15 """
---> 16 c.ts_query('aarhus2',fmt)

/home/vagrant/ts-demo/local/lib/python2.7/site-packages/riak/client/transport.pyc in wrapper(self, *args, **kwargs)
    177             return fn(self, transport, *args, **kwargs)
    178 
--> 179         return self._with_retries(pool, thunk)
    180 
    181     wrapper.__doc__ = fn.__doc__

/home/vagrant/ts-demo/local/lib/python2.7/site-packages/riak/client/transport.pyc in _with_retries(self, pool, fn)
    119                 with pool.transaction(_filter=_skip_bad_nodes) as transport:
    120                     try:
--> 121                         return fn(transport)
    122                     except (IOError, HTTPException) as e:
    123                         if _is_retryable(e):

/home/vagrant/ts-demo/local/lib/python2.7/site-packages/riak/client/transport.pyc in thunk(transport)
    175 
    176         def thunk(transport):
--> 177             return fn(self, transport, *args, **kwargs)
    178 
    179         return self._with_retries(pool, thunk)

/home/vagrant/ts-demo/local/lib/python2.7/site-packages/riak/client/operations.pyc in ts_query(self, transport, table, query, interpolations)
    634         if isinstance(t, string_types):
    635             t = Table(self, table)
--> 636         return transport.ts_query(t, query, interpolations)
    637 
    638     def ts_stream_keys(self, table, timeout=None):

/home/vagrant/ts-demo/local/lib/python2.7/site-packages/riak/transports/tcp/transport.pyc in ts_query(self, table, query, interpolations)
    183         tsobj = TsObject(self._client, table)
    184         codec.decode_timeseries(resp, tsobj,
--> 185                                 self._ts_convert_timestamp)
    186         return tsobj
    187 

/home/vagrant/ts-demo/local/lib/python2.7/site-packages/riak/codecs/ttb.pyc in decode_timeseries(self, resp_ttb, tsobj, convert_timestamp)
    179                     "Expected 3-tuple in response, got: {}".format(resp_data))
    180         else:
--> 181             raise RiakError("Unknown TTB response type: {}".format(resp_a))
    182 
    183     def decode_timeseries_cols(self, cnames, ctypes):

RiakError: 'Unknown TTB response type: t'

@hazen hazen force-pushed the bch-handle-sql-creation-in-ttb branch from 881e594 to 1b9ee6c Compare May 5, 2016 23:32
resp_a = resp_ttb[0]
if resp_a == tsputresp_a:

if resp_ttb == tsqueryresp_a:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I would argue the bug is in riak_kv, and the returned data should be {tsqueryresp, {[], [], []}}, but I guess this is simpler. I will re-work this since I misread that you were comparing the entire ttb message as the atom after the statement that extracts the first element from (what I expected to be) a tuple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants