hector-client/hector

Rows with no columns throw a "thriftColumn is null" assertion error when constructing results

tfoel opened this issue · 2 comments

There was a similar issue a year ago, but it was closed seemingly without a solution - however, I experience the same with hector 1.0-5, 1.1-1 and 1.1-2 as well. Cassandra version is 1.0.12.

There is an ordinary column family with Composite keys, Long names and UUID values. All the columns have a week's TTL set. Whenever a query hits a column that was deleted due to its TTL, the assertion error happens.

I cannot tell whether in this case Cassandra should return null columns at all or not, but it does, and hector tries to create HColumnImpl of it in ColumnSliceImpl line 25.
The fix seems simple - add a null check - but it is still weird that this issue is not seen more often... ?

That is weird. We certainly should not be throwing an NPE. If you want to take a stab at fixing this and sending a patch or a pull request that would be super helpful. It's going to be a couple of days before I can get to it otherwise.
Either way, thanks for bringing it up.

Hi, I have exactly the same problem with a RangeSlicesQuery which contains empty rows in the thrift reponse from Cassandra. This is a ColumnFamily with counters so TTL can not be the issue (because counter columns unfortunately don't have TTL support).

EDIT: My bad, I used the wrong query class.