[
https://issues.apache.org/jira/browse/CASSPYTHON-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18126314#comment-18126314
]
Bohdan Siryk commented on CASSPYTHON-29:
----------------------------------------
> could you or someone clarify on the Jira if the arbitrary key/value pairs
> could be unlimited in length and include binary or unprintable characters?
[~bschoeni] answering your question in Slack, according to protocol it should
be a [string map] of options, and [string map] is:
{code:java}
[string map] A [short] n, followed by n pair <k><v> where <k> and <v>
are [string]. {code}
So, map length is limited to short (65536) entries. String length is also
limited to short.
We can put any valid UTF-8 characters, including unprintable. With the current
implementation, just put bytearray([any byte sequence]) as a key or value and
it will work.
Also, I tested if we could put strings that are bigger than 65535 and we can't
do such. It looks like this is validated by uint16_pack'er.
> Allow user to specify arbitrary parameters for STARTUP message
> --------------------------------------------------------------
>
> Key: CASSPYTHON-29
> URL: https://issues.apache.org/jira/browse/CASSPYTHON-29
> Project: Apache Cassandra Python driver
> Issue Type: Improvement
> Components: Core
> Reporter: Swathi Sekar
> Assignee: Bohdan Siryk
> Priority: Normal
> Fix For: 4.0.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Modify the driver to allow sending arbitrary STARTUP message options.
> Proposed design:
> - Add `extra_startup_options` param to Cluster constructor.
> - Thread it through Cluster -> connection setup (cluster.py) ->
> StartupMessage.
> - Define clear precedence/conflict behavior when duplicate/conflicting
> options are passed into the StartupMessage constructor.
> *Note:*
> This Jira was originally created for sending the client's application name
> and version as `APPLICATION_NAME` /
> `APPLICATION_VERSION` options in the STARTUP message, which is tied to the
> now-defunct DataStax Insights offering.
> Since the Java driver (5.0.0) and eventually C/C++ driver (3.0.0) are
> removing withApplicationName()/withApplicationVersion() entirely, this ticket
> has been updated.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]