Skip to content
This repository has been archived by the owner on Feb 22, 2019. It is now read-only.

Mitigate cryptic "cannot parse as hex bytes" error via explicit cqlVersion test #109

Merged
merged 3 commits into from
Jun 18, 2013

Conversation

tristanls
Copy link
Contributor

This should mitigate errors and confusion of the type described in #108.

@devdazed
Copy link
Contributor

So, there are just a couple of concerns I have. First is that this will break backward compatibility as Helenus currently defaults to CQL3. (see: connections.js) for C* 1.2 and CQL 2 for lesser versions.

The desired behavior is that you do not need to explicitly set the version, which makes me think there is a bug in the CQL selection.

If you look [here[(https://github.com/simplereach/helenus/blob/master/lib/connection.js#L452-L470) you will see that the default version is 2.0.0 if the CQL version has not been set to 3. CQL version 3 is only allowed after is has been set OR if the version is greater than 19.33.0 (C* 1.2.0). That is where I think the issue is. Can you verify if changing this line fixes the issue?

it should look something like:

(this.cqlVersion === '3.0.0' || (this.version[0] === '19' && this.version[1] > '33')) 

@tristanls
Copy link
Contributor Author

What you described fixes the issue.

devdazed added a commit that referenced this pull request Jun 18, 2013
Mitigate cryptic "cannot parse as hex bytes" error via explicit `cqlVersion` test. closes @108
@devdazed devdazed merged commit 634b5f1 into simplereach:master Jun 18, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants