You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Matthew F. Dennis (JIRA)" <ji...@apache.org> on 2011/01/21 23:07:51 UTC

[jira] Created: (CASSANDRA-2033) dropping and recreating a keyspace sometimes breaks sets and list in the CLI

dropping and recreating a keyspace sometimes breaks sets and list in the CLI
----------------------------------------------------------------------------

                 Key: CASSANDRA-2033
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2033
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 0.7.0
            Reporter: Matthew F. Dennis


If a keyspace is dropped and recreated, sets and list no longer work in the CLI even though get still does

This is possibly caused by CASSANDRA-2026

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Resolved] (CASSANDRA-2033) dropping and recreating a keyspace sometimes breaks sets and list in the CLI

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis resolved CASSANDRA-2033.
---------------------------------------

    Resolution: Won't Fix

reloading schema before each command in case another client modifies things out from underneath it isn't a design goal for the cli

> dropping and recreating a keyspace sometimes breaks sets and list in the CLI
> ----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2033
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2033
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Matthew F. Dennis
>
> If a keyspace is dropped and recreated, sets and list no longer work in the CLI even though get still does
> This is possibly caused by CASSANDRA-2026

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-2033) dropping and recreating a keyspace sometimes breaks sets and list in the CLI

Posted by "Lars Wunderlich (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040866#comment-13040866 ] 

Lars Wunderlich commented on CASSANDRA-2033:
--------------------------------------------

Strange behaviour also shown if data is inserted via CQL while being attached to on active keyspace (see sequence of steps below):

D:\apache-cassandra-0.8.0-rc1\bin>cassandra-cli
Starting Cassandra Client
Welcome to the Cassandra CLI.

Type 'help;' or '?' for help.
Type 'quit;' or 'exit;' to quit.

[default@unknown] connect localhost/9160;
Connected to: "Test Cluster" on localhost/9160
[default@unknown] drop keyspace testspace;
67aecd80-8a2f-11e0-0000-242d50cf1f9f
Waiting for schema agreement...
... schemas agree across the cluster
[default@unknown] create keyspace testspace;
6f4d2e60-8a2f-11e0-0000-242d50cf1f9f
Waiting for schema agreement...
... schemas agree across the cluster
[default@unknown] use testspace;
Authenticated to keyspace: testspace
[default@testspace] get users['user1'];
users not found in current keyspace.

=> At this time, result in cli is fine. Cli is kept open, now we perform an insert via Java:

Inserts via CQL:

Class.forName("org.apache.cassandra.cql.jdbc.CassandraDriver");
Connection c = DriverManager.getConnection("jdbc:cassandra:/@127.0.0.1:9160/testspace");
Statement stm = c.createStatement();
stm.execute("CREATE COLUMNFAMILY users (KEY varchar PRIMARY KEY);");
stm.execute("INSERT INTO users (KEY, password, gender, state, birth_year) VALUES ('user1', 'ch@ngem3', 'f', 'CA', '1971');");

Change back to Cassandra-cli process:

[default@testspace] get users['user1'];
users not found in current keyspace.

 => wrong answer as users column family has successfully been created in the meanwhile, a keyspace check directly afterwards confirms this:

[default@testspace] describe keyspace testspace;
Keyspace: testspace:
  Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
    Options: [datacenter1:1]
  Column Families:
    ColumnFamily: users
      Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
      Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
      Row cache size / save period in seconds: 0.0/0
      Key cache size / save period in seconds: 200000.0/14400
      Memtable thresholds: 0.2953125/63/1440 (millions of ops/MB/minutes)
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/32
      Read repair chance: 1.0
      Replicate on write: true
      Built indexes: [users.birth_year_idx, users.gender_idx, users.password_idx, users.state_idx]
      Column Metadata:
        Column Name: state
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
          Index Name: state_idx
          Index Type: KEYS
        Column Name: birth_year
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
          Index Name: birth_year_idx
          Index Type: KEYS
        Column Name: password
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
          Index Name: password_idx
          Index Type: KEYS
        Column Name: gender
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
          Index Name: gender_idx
          Index Type: KEYS

 => exit cli process and directly restart it to check answer:

[default@testspace] exit;

D:\apache-cassandra-0.8.0-rc1\bin>cassandra-cli
Starting Cassandra Client
Welcome to the Cassandra CLI.

Type 'help;' or '?' for help.
Type 'quit;' or 'exit;' to quit.

[default@unknown] connect localhost/9160;
Connected to: "Test Cluster" on localhost/9160
[default@unknown] use testspace;
Authenticated to keyspace: testspace
[default@testspace] get users['user1'];
=> (column=birth_year, value=1971, timestamp=1306699746721)
=> (column=gender, value=f, timestamp=1306699746721)
=> (column=password, value=ch@ngem3, timestamp=1306699746721)
=> (column=state, value=CA, timestamp=1306699746721)
Returned 4 results.

  => now result is fine



> dropping and recreating a keyspace sometimes breaks sets and list in the CLI
> ----------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2033
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2033
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 0.7.0
>            Reporter: Matthew F. Dennis
>
> If a keyspace is dropped and recreated, sets and list no longer work in the CLI even though get still does
> This is possibly caused by CASSANDRA-2026

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira