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

Bret McGuire commented on CASSJAVA-92:
--------------------------------------

I think [~smiklosovic] and I are saying the same thing re: passing a map of 
name -> local DC maps in cases where multiple execution profiles are in play.  
The main thing I wanted to make clear is that if we send this list along with a 
STARTUP message we have no way of knowing whether _all_ execution profiles will 
actually be used or not.  That's because execution profiles can be specified on 
a per-operation basis; from the example [in the 
docs|https://github.com/apache/cassandra-java-driver/tree/4.x/manual/core/configuration#execution-profiles]:

 

```

SimpleStatement s =
  SimpleStatement.builder("SELECT name FROM user WHERE id = 1")
      .setExecutionProfileName("oltp")
      .build();
session.execute(s);

```

 

Obviously there's no way to know in advance that the "oltp" execution profile 
in this case will be used until the user's program actually executes that code. 
 So if we send in a map we'd basically be saying "most operations will consider 
this (insert local DC from 'default' profile here) value as the local DC but 
the driver config also includes definitions for these local DCs so you should 
expect them to".

> Add Local DC to driver connection info and provide visibility with nodetool 
> clientstats
> ---------------------------------------------------------------------------------------
>
>                 Key: CASSJAVA-92
>                 URL: https://issues.apache.org/jira/browse/CASSJAVA-92
>             Project: Apache Cassandra Java driver
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Brad Schoening
>            Assignee: Lukasz Antoniak
>            Priority: Normal
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> When a client application connects to Cassandra using one of the drivers, it 
> specifies a local DC now. If the server is aware of the local DC specified, 
> this would be very useful to include in {_}nodetool clientstats{_}.
> We often have clusters running disaster recovery scenarios and they'll turn 
> off NTR on a DC. But they do not always understand what DC's are being used 
> as local DC if they have dozens of applications connecting from different 
> teams. In a brown-out scenario, this would also be useful to identify the 
> applications connecting to a degraded datacenter.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to