Key-value payloads in native protocol v4

Environment

None

Pull Requests

None

Activity

Show:
Adam Holmberg
May 12, 2015, 12:51 PM

If a user passes in values for the custom_payload that are not valid, what sort of exceptions are expected from the driver.

It's not really specified. The exception you show here is accurate, but probably a little vague. I'm on the fence about putting too much polish on this since it's such an esoteric feature. In this case, I could probably put some input validation that explains what the limitation is. It will raise ValueError if you're writing a test around it.

Greg Bestland
May 11, 2015, 10:45 PM
Edited

So a few questions for Adam,

If a user passes in values for the custom_payload that are not valid, what sort of exceptions are expected from the driver. I'm seeing some behavior that I'm not sure is 100% right. For instance, when when I pass in a map of size > uShort I receive the following

File "/Users/gregbestland/git/python-driver/cassandra/cluster.py", line 3087, in result
raise self._final_exception
NoHostAvailable: ('Unable to complete the operation against any hosts', {<Host: 127.0.0.3 dc1>: error("'H' format requires 0 <= number <= 65535",), <Host: 127.0.0.2 dc1>: error("'H' format requires 0 <= number <= 65535",), <Host: 127.0.0.1 dc1>: error("'H' format requires 0 <= number <= 65535",)})

I just wanted to make sure that this was expected.

Michael Penick
April 23, 2015, 11:37 PM

LGTM added a couple comments to the PR, but they can be refuted or ignored.

Adam Holmberg
April 20, 2015, 3:03 PM
Fixed

Assignee

Adam Holmberg

Reporter

Adam Holmberg

Fix versions

PM Priority

B