CASSANDRA-3288
When trying to add a column family through Hector client, the operation fails with me.prettyprint.hector.api.exceptions.HCassandraInternalException: Cassandra encountered an internal error processing this request. Client simply terminates.
early termination,
Critical
Yes. me.prettyprint.hector.api.exceptions.HCassandraInternalException: Cassandra encountered an internal error processing this request.
no
no
single client
no
1.0.0
Standard Configuration. We must pre insert a column family through CLI. The first Column family should have an ID with 0.
1
1. create a column family with ID=0 (file write)
2. Using Hector’s system_add_column_family api to add a column family in Cassandra(feature start)
2
yes
yes
yes
1
yes
When trying to add a column family through Hector client, the operation fails with Cassandra encountered an internal error processing this request message.
After seeing the Hector client error message while trying to add a column family, the first step of diagnosis is to take a look at the data passed to Cassandra. We see a column family definition (schema of column family) being passed to Cassandra just before the error. Inside the column family definition, we noticed the column family ID is 0. However an already existing entry inside Cassandra with column family ID of 0. Because of this duplicated ID, cassandra is preventing with the “add column family” operation from completing successfully. Through further analysis, we realized the column family ID in the column family definition is just a placeholder and serves no purpose. Since the ID serves no purpose, we can safely ignore it on Cassandra side.
yes
Redundant ID field in column family definition conflicts with existing data inside Cassandra. Cassandra did not ignore the redundant field. When handling add column family operation, the passed in ID is a conflict with existing column family ID.
semantic
no
yes
Ignore the column family ID on the server side when passed in through column family definition.
+ cf_def.unsetId(); // explicitly ignore any id set by client (Hector likes to set zero)