Bohdan Siryk created CASSGO-120:
-----------------------------------

             Summary: Query and Batch Observers always capture session level 
keyspace
                 Key: CASSGO-120
                 URL: https://issues.apache.org/jira/browse/CASSGO-120
             Project: Apache Cassandra Go driver
          Issue Type: Bug
            Reporter: Bohdan Siryk


*Expected*

Both *QueryObserver* and *BatchObserver* report a correct keyspace if it is 
specified on a query level, e.g. reporting *gocql_test* keyspace if it was 
specified in the query {*}SELECT id FROM gocql_test.test_table{*}.

*Actual*

Both report a keyspace which is specified in the cluster config 
{*}ClusterConfig.Keyspace{*}.

Please use the following code snippet to reproduce it: 
https://gist.github.com/worryg0d/1fa6bb26770138cf24b0384c5d5f701f

The output you will see:

{code:java}
Executing queries, so observer should capture queries for gocqltest and 
gocqltest2 keyspaces respectively
--------------------------------
Observed query:
  Statement: INSERT INTO gocqltest.observe (id) VALUES (?)
  Keyspace: system
Executing batch, so observer should capture batches for gocqltest and 
gocqltest2 keyspaces respectively
--------------------------------
Observed batch:
  Statements:
    [0] INSERT INTO gocqltest.observe (id) VALUES (?)
    [1] INSERT INTO gocqltest.observe (id) VALUES (?)
  Keyspace: system
{code}




--
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