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

Null Column Exception Caused by Invalid Tags reaching Write Buffer #26

Merged
merged 1 commit into from
Feb 11, 2014

Conversation

warmans
Copy link
Contributor

@warmans warmans commented Feb 11, 2014

When using Cassandra and the REST API if any client appends a trailing slash to their datapoints POST requests they will trigger an exception when the string_index write buffer is flushed. The sting index is updated as a result of the kairosdb.protocol.http_request_count metric being created with a blank value for it's method tag (see MonitorFilter).

[Thread-5] ERROR [WriteBuffer.java:201] - Error sending data to Cassandra
me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:column name must not be empty)
        at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:52) ~[hector-core-1.1-4.jar:na]
        at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:260) ~[hector-core-1.1-4.jar:na]
        at me.prettyprint.cassandra.model.ExecutingKeyspace.doExecuteOperation(ExecutingKeyspace.java:113) ~[hector-core-1.1-4.jar:na]
        at me.prettyprint.cassandra.model.MutatorImpl.execute(MutatorImpl.java:243) ~[hector-core-1.1-4.jar:na]
        at org.kairosdb.datastore.cassandra.WriteBuffer.run(WriteBuffer.java:195) ~[kairosdb.jar:0.9.3.20140116214226]
        at java.lang.Thread.run(Unknown Source) [na:1.7.0_45]
Caused by: org.apache.cassandra.thrift.InvalidRequestException: null
        at org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:20833) ~[cassandra-thrift-1.2.5.jar:1.2.5]
        at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78) ~[libthrift-0.7.0.jar:0.7.0]
        at org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:964) ~[cassandra-thrift-1.2.5.jar:1.2.5]
        at org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:950) ~[cassandra-thrift-1.2.5.jar:1.2.5]
        at me.prettyprint.cassandra.model.MutatorImpl$3.execute(MutatorImpl.java:246) ~[hector-core-1.1-4.jar:na]
        at me.prettyprint.cassandra.model.MutatorImpl$3.execute(MutatorImpl.java:243) ~[hector-core-1.1-4.jar:na]
        at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:104) ~[hector-core-1.1-4.jar:na]
        at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:253) ~[hector-core-1.1-4.jar:na]
        ... 4 common frames omitted

The fix prevents blank method tags from being added, adds additional debug information to show when something is attempting to insert invalid data into cassandra and discards any rows from the write buffer if they are not valid.

brianhks added a commit that referenced this pull request Feb 11, 2014
Null Column Exception Caused by Invalid Tags reaching Write Buffer
@brianhks brianhks merged commit 9662512 into kairosdb:develop Feb 11, 2014
rcosnita added a commit to rcosnita/kairosdb that referenced this pull request Jan 25, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants