[jira] [Commented] (CASSANDRA-14335) C* nodetool should report the lowest of the highest CQL protocol version supported by all clients connecting to it

2018-05-04 Thread Dinesh Joshi (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-14335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16464426#comment-16464426
 ] 

Dinesh Joshi commented on CASSANDRA-14335:
--

Thanks [~jasobrown]

> C* nodetool should report the lowest of the highest CQL protocol version 
> supported by all clients connecting to it
> --
>
> Key: CASSANDRA-14335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14335
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Dinesh Joshi
>Assignee: Dinesh Joshi
>Priority: Major
> Fix For: 4.0
>
>
> While upgrading C*, it makes it hard to tell whether any client will be 
> affected if C* is upgraded. C* should internally store the highest protocol 
> version of all clients connecting to it. The lowest supported version will 
> help determining if any client will be adversely affected by the upgrade.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14335) C* nodetool should report the lowest of the highest CQL protocol version supported by all clients connecting to it

2018-05-04 Thread Jason Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-14335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16464329#comment-16464329
 ] 

Jason Brown commented on CASSANDRA-14335:
-

Ughh, forgot to commit my minor changes locally before pushing up. commited 
those changes as {{68605cf03bdfecb11cd69c6d5260a773e4e87300}}

> C* nodetool should report the lowest of the highest CQL protocol version 
> supported by all clients connecting to it
> --
>
> Key: CASSANDRA-14335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14335
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Dinesh Joshi
>Assignee: Dinesh Joshi
>Priority: Major
> Fix For: 4.0
>
>
> While upgrading C*, it makes it hard to tell whether any client will be 
> affected if C* is upgraded. C* should internally store the highest protocol 
> version of all clients connecting to it. The lowest supported version will 
> help determining if any client will be adversely affected by the upgrade.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14335) C* nodetool should report the lowest of the highest CQL protocol version supported by all clients connecting to it

2018-05-03 Thread Dinesh Joshi (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-14335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16463159#comment-16463159
 ] 

Dinesh Joshi commented on CASSANDRA-14335:
--

[~jasobrown] I have updated my branch with an implementation that will be 
threadsafe as well as performant. As part of this change, I am introducing 
addition flags for {{nodetool clientstats}} command. We can use {{nodetool 
clientstats --by-protocol}} to give you the list last 100 clients that the C* 
process has seen for each protocol. I am deduping by IP address so you should 
see unique IPs. You can clear this list by running {{nodetool clientstats 
--clear-history}} to clear the history of all clients.

For posterity - [~jasobrown] and I had a conversation about the usefulness of 
having this information. Although the existing {{nodetool clientstats --all}} 
is sufficient to tell you what clients are _currently_ connected to the C* 
process including the protocol version, this information is ephemeral. There 
are many situations where an operator may miss intermittently connecting 
clients for example - batch processes. Additionally, we can script around by 
periodically invoking {{nodetool clientstats --all}} from external scripts but 
that is sub-optimal for a variety of reasons - you can still miss intermittent 
clients, you unnecessarily make calls over JMX. Storing this historical 
information in the C* process means you wont miss intermittently connecting 
clients and would be overall more efficient that going over JMX all the time.

> C* nodetool should report the lowest of the highest CQL protocol version 
> supported by all clients connecting to it
> --
>
> Key: CASSANDRA-14335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14335
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Dinesh Joshi
>Assignee: Dinesh Joshi
>Priority: Major
>
> While upgrading C*, it makes it hard to tell whether any client will be 
> affected if C* is upgraded. C* should internally store the highest protocol 
> version of all clients connecting to it. The lowest supported version will 
> help determining if any client will be adversely affected by the upgrade.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14335) C* nodetool should report the lowest of the highest CQL protocol version supported by all clients connecting to it

2018-05-02 Thread Dinesh Joshi (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-14335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16461161#comment-16461161
 ] 

Dinesh Joshi commented on CASSANDRA-14335:
--

This will just give me the currently connected clients. When the client 
connects and drops off we won’t have any idea of what protocol version it used. 
So, my patch keeps a history of last N Clients and their protocol versions. 

> C* nodetool should report the lowest of the highest CQL protocol version 
> supported by all clients connecting to it
> --
>
> Key: CASSANDRA-14335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14335
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Dinesh Joshi
>Assignee: Dinesh Joshi
>Priority: Major
>
> While upgrading C*, it makes it hard to tell whether any client will be 
> affected if C* is upgraded. C* should internally store the highest protocol 
> version of all clients connecting to it. The lowest supported version will 
> help determining if any client will be adversely affected by the upgrade.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14335) C* nodetool should report the lowest of the highest CQL protocol version supported by all clients connecting to it

2018-05-02 Thread Jason Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-14335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16461026#comment-16461026
 ] 

Jason Brown commented on CASSANDRA-14335:
-

We already store the {{ProtocolVersion}} along with the channel in 
{{Connection}}. We also store a reference to the {{Connection}} in the 
{{Channel}}, as a channel attribute. Thus, it seems to me you could just add a 
method like this to {{Server.ConnectionTracker}} (I changed the return type to 
make the example simpler):

{code:java}
public Map> 
getClientsByProtocolVersion()
{
Map> result = new 
EnumMap<>(ProtocolVersion.class);
for (Channel c : allChannels)
{
Attribute attrConn = 
c.attr(Connection.attributeKey);
Connection connection = attrConn.get();
if (connection != null)
{
ProtocolVersion version = connection.getVersion();
SocketAddress addr = c.remoteAddress();
result.computeIfAbsent(version, protocolVersion -> new 
HashSet<>());
result.get(version).add(addr);
}
}
return result;
}
{code}

(Note: {{ConnectionTracker#allChannels}} is a {{DefaultChannelGroup}}, whose 
{{Iterator()}} method wraps two {{ConcurrentHashMap}} s, so I think you are 
safe concurrency-wise.) This gives you a snapshot of everything that is 
currently connected. Is this sufficient, [~djoshi3]?

> C* nodetool should report the lowest of the highest CQL protocol version 
> supported by all clients connecting to it
> --
>
> Key: CASSANDRA-14335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14335
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Dinesh Joshi
>Assignee: Dinesh Joshi
>Priority: Major
>
> While upgrading C*, it makes it hard to tell whether any client will be 
> affected if C* is upgraded. C* should internally store the highest protocol 
> version of all clients connecting to it. The lowest supported version will 
> help determining if any client will be adversely affected by the upgrade.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14335) C* nodetool should report the lowest of the highest CQL protocol version supported by all clients connecting to it

2018-05-01 Thread Dinesh Joshi (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-14335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16460545#comment-16460545
 ] 

Dinesh Joshi commented on CASSANDRA-14335:
--

I have fixed some minor issues with the patch that I spotted. I am not 100% 
certain that this class needs to be thread safe. Thoughts?

> C* nodetool should report the lowest of the highest CQL protocol version 
> supported by all clients connecting to it
> --
>
> Key: CASSANDRA-14335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14335
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Dinesh Joshi
>Assignee: Dinesh Joshi
>Priority: Major
>
> While upgrading C*, it makes it hard to tell whether any client will be 
> affected if C* is upgraded. C* should internally store the highest protocol 
> version of all clients connecting to it. The lowest supported version will 
> help determining if any client will be adversely affected by the upgrade.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14335) C* nodetool should report the lowest of the highest CQL protocol version supported by all clients connecting to it

2018-05-01 Thread Dinesh Joshi (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-14335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16460542#comment-16460542
 ] 

Dinesh Joshi commented on CASSANDRA-14335:
--

Thank you [~jasobrown]. [~zznate] just so you have more background, I have a 
paid CircleCI account that supports higher quotas. In order to use it, I need 
to update the settings. So my patches are typically two commits. You can cherry 
pick just the patch and ignore the CircleCI commit. If there is a better way to 
do this, I'm happy to discuss it :)

> C* nodetool should report the lowest of the highest CQL protocol version 
> supported by all clients connecting to it
> --
>
> Key: CASSANDRA-14335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14335
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Dinesh Joshi
>Assignee: Dinesh Joshi
>Priority: Major
>
> While upgrading C*, it makes it hard to tell whether any client will be 
> affected if C* is upgraded. C* should internally store the highest protocol 
> version of all clients connecting to it. The lowest supported version will 
> help determining if any client will be adversely affected by the upgrade.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14335) C* nodetool should report the lowest of the highest CQL protocol version supported by all clients connecting to it

2018-05-01 Thread Jason Brown (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-14335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16460397#comment-16460397
 ] 

Jason Brown commented on CASSANDRA-14335:
-

[~zznate] the circleci changes are just for running the utests/dtests, and not 
part of the real commit. We make sure to not commit those.

> C* nodetool should report the lowest of the highest CQL protocol version 
> supported by all clients connecting to it
> --
>
> Key: CASSANDRA-14335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14335
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Dinesh Joshi
>Assignee: Dinesh Joshi
>Priority: Major
>
> While upgrading C*, it makes it hard to tell whether any client will be 
> affected if C* is upgraded. C* should internally store the highest protocol 
> version of all clients connecting to it. The lowest supported version will 
> help determining if any client will be adversely affected by the upgrade.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14335) C* nodetool should report the lowest of the highest CQL protocol version supported by all clients connecting to it

2018-05-01 Thread Nate McCall (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-14335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16460378#comment-16460378
 ] 

Nate McCall commented on CASSANDRA-14335:
-

[~djoshi3] You have some config changes to CircleCI as part of this branch - 
was that intentional? Can we put those in a separate ticket if so?

> C* nodetool should report the lowest of the highest CQL protocol version 
> supported by all clients connecting to it
> --
>
> Key: CASSANDRA-14335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14335
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Dinesh Joshi
>Assignee: Dinesh Joshi
>Priority: Major
>
> While upgrading C*, it makes it hard to tell whether any client will be 
> affected if C* is upgraded. C* should internally store the highest protocol 
> version of all clients connecting to it. The lowest supported version will 
> help determining if any client will be adversely affected by the upgrade.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-14335) C* nodetool should report the lowest of the highest CQL protocol version supported by all clients connecting to it

2018-05-01 Thread Dinesh Joshi (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-14335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16460233#comment-16460233
 ] 

Dinesh Joshi commented on CASSANDRA-14335:
--

||trunk||
|[branch|https://github.com/dineshjoshi/cassandra/tree/14335-trunk]|
|[utests & 
dtests|https://circleci.com/gh/dineshjoshi/workflows/cassandra/tree/14335-trunk]|
||

> C* nodetool should report the lowest of the highest CQL protocol version 
> supported by all clients connecting to it
> --
>
> Key: CASSANDRA-14335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14335
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Dinesh Joshi
>Assignee: Dinesh Joshi
>Priority: Major
>
> While upgrading C*, it makes it hard to tell whether any client will be 
> affected if C* is upgraded. C* should internally store the highest protocol 
> version of all clients connecting to it. The lowest supported version will 
> help determining if any client will be adversely affected by the upgrade.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org