incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dnalls...@taz.qinetiq.com
Subject Cannot set column value to zero
Date Wed, 29 Jun 2011 14:13:42 GMT
I had a strange problem recently where I was unable to set the value of a column
to '0' (it always returned '1') but setting it to other values worked fine:

[default@Test] set Urls['rowkey']['status']='1';
Value inserted.
[default@Test] get Urls['rowkey'];
=> (column=status, value=1, timestamp=1309189541891000)
Returned 1 results.

[default@Test] set Urls['rowkey']['status']='0';
Value inserted.
[default@Test] get Urls['rowkey'];
=> (column=status, value=1, timestamp=1309189551407616)
Returned 1 results.

This was on a one-node test cluster (v0.7.6) with no other clients; setting
other values (e.g. '9') worked fine. However, attempting to set the value back
to '0' always resulted in a value of '1'.

I noticed this shortly after truncating the CF.

The column family was shown as follows below. One thing that looks odd is that
on other test clusters the Column Name is followed by a reference to
the index, e.g. "Column Name: status (737461747573)" - but here it isn't.

I was wondering if there was some interaction between truncating the CF and the
use of a KEYS index? (Presumably it would be safer to delete all data
directories in order to wipe the cluster during experimentation, rather than
truncating?)

Unfortunately I'm not sure how to recreate the situation as this was a test
machine on which I played around with various configurations - but maybe
someone has seen a similar problem elsewhere? In the end I had to wipe the data
and start again, and all seemed fine, although the index reference is still
absent as mentioned above.

[default@Test] describe keyspace;
Keyspace: Test:
...
    ColumnFamily: Foo
      default_validation_class: org.apache.cassandra.db.marshal.BytesType
      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: 0.0/14400
      Memtable thresholds: 0.5/128/60 (millions of ops/minutes/MB)
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/32
      Read repair chance: 1.0
      Built indexes: [Foo.737461747573]
      Column Metadata:
        Column Name: status
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
          Index Type: KEYS
...

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

This email and any attachments to it may be confidential and are
intended solely for the use of the individual to whom it is addressed.
If you are not the intended recipient of this email, you must neither
take any action based upon its contents, nor copy or show it to anyone.
Please contact the sender if you believe you have received this email in
error. QinetiQ may monitor email traffic data and also the content of
email for the purposes of security. QinetiQ Limited (Registered in
England & Wales: Company Number: 3796233) Registered office: Cody Technology 
Park, Ively Road, Farnborough, Hampshire, GU14 0LX http://www.qinetiq.com.

Mime
View raw message