cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Motta (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-9689) keyspace does not show in describe list, if create query times out
Date Mon, 31 Aug 2015 22:47:46 GMT

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

Paulo Motta commented on CASSANDRA-9689:
----------------------------------------

Attached 2.1 and 2.2+ patches..

Based on Tyler's suggestion the solution checks if there's a schema mismatch after a {{OperationTimedOut}}
exception and in positive case, the schema metadata is reloaded with {{cluster.refresh_schema_metadata(max_schema_agreement_wait=0)}},
which was implemented on [PYTHON-205|https://datastax-oss.atlassian.net/browse/PYTHON-205]
and effectively bypasses schema agreement during metadata refresh. This guarantees that the
subsequent operation will (which can be a {{describe keyspaces}} or {{describe tables}}) will
have the most recent schema version. It's also printed a warning about the schema disagreement.

I also replaced the workaround for CASSANDRA-8512 (created before [PYTHON-205|https://datastax-oss.atlassian.net/browse/PYTHON-205]
was implemented)  by using the new python driver`s method {{cluster.refresh_schema_metadata(max_schema_agreement_wait=0)}}.

I created a [cassandra dtest PR|https://github.com/riptano/cassandra-dtest/pull/522] with
a simple test to validate the scenario of this ticket and the new metadata refresh behavior.

Tests:
* [2.1 dtests|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9689-2.1-dtest/]
* [2.1 testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9689-2.1-testall/]
* [2.2 dtests|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9689-2.2-dtest/]
* [2.2 testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9689-2.2-testall/]
* [3.0 dtests|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9689-3.0-dtest/]
* [3.0 testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9689-3.0-testall/]
* [trunk dtests|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9689-trunk-dtest/]
* [trunk testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-9689-trunk-testall/]

Would you mind reviewing [~blerer]?

> keyspace does not show in describe list, if create query times out
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-9689
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9689
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Roopesh
>            Assignee: Paulo Motta
>              Labels: cqlsh
>             Fix For: 2.1.x
>
>
> Here is the snapshot of the overall issue :
> whiterabbit@whiterabbit:~/cassandra/bin$ ccm create 'demo2' -v binary:2.1.7 -n 3 -s -d

> Current cluster is now: demo2
> whiterabbit@whiterabbit:~/cassandra/bin$ ccm list
>   demo_1node
>  *demo2
> whiterabbit@whiterabbit:~/cassandra/bin$ ccm status
> Cluster: 'demo2'
> ----------------
> node1: UP
> node3: UP
> node2: UP
> whiterabbit@whiterabbit:~/cassandra/bin$ ccm node2 nodetool version
> ReleaseVersion: 2.1.7
> whiterabbit@whiterabbit:~/cassandra/bin$ ccm node2 stop
> whiterabbit@whiterabbit:~/cassandra/bin$ ccm status
> Cluster: 'demo2'
> ----------------
> node1: UP
> node3: UP
> node2: DOWN
> whiterabbit@whiterabbit:~/cassandra/bin$ ccm node1 cqlsh
> Connected to demo2 at 127.0.0.1:9042.
> [cqlsh 5.0.1 | Cassandra 2.1.7 | CQL spec 3.2.0 | Native protocol v3]
> Use HELP for help.
> cqlsh> describe keyspaces;
> system_traces  system
> cqlsh> create keyspace training with replication={'class':'SimpleStrategy','replication_factor':1};
> OperationTimedOut: errors={}, last_host=127.0.0.1
> cqlsh> create keyspace training with replication={'class':'SimpleStrategy','replication_factor':1};
> AlreadyExists: Keyspace 'training' already exists
> cqlsh> describe keyspaces;
> system_traces  system
> cqlsh> 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message