Patrik Modesto created CASSANDRA-4220:
-----------------------------------------
Summary: IntegerType secondary index returns no rows
Key: CASSANDRA-4220
URL: https://issues.apache.org/jira/browse/CASSANDRA-4220
Project: Cassandra
Issue Type: Bug
Components: Core
Affects Versions: 1.0.9
Environment: Debian Squeeze Linux, kernel 2.6.32, sun-java6-bin
6.26-0squeeze1
Reporter: Patrik Modesto
Hi,
there is something wrong with IntegerType secondary index. It's the 3rd time
this happend. See this example:
{noformat}
[default@rfTest3] get GroupUrlPatternI['25793:51113'];
=> (column=2012-03-04, value={"impressions":1,"avg_position":1},
timestamp=1336113412788000)
=> (column=patternId, value=51113, timestamp=1336113412788000)
Returned 2 results.
Elapsed time: 3 msec(s).
[default@rfTest3] get GroupUrlPatternI where patternId = 51113;
0 Row Returned.
Elapsed time: 9 msec(s).
[default@rfTest3]
{noformat}
GroupUrlPatternI is defined like this:
{noformat}
ColumnFamily: GroupUrlPatternI
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 / keys to save : 0.0/0/all
Row Cache Provider: org.apache.cassandra.cache.SerializingCacheProvider
Key cache size / save period in seconds: 200000.0/14400
GC grace seconds: 864000
Compaction min/max thresholds: 4/32
Read repair chance: 1.0
Replicate on write: true
Bloom Filter FP chance: default
Built indexes: [GroupUrlPatternI.GroupUrlPatternI_patternId_idx]
Column Metadata:
Column Name: patternId
Validation Class: org.apache.cassandra.db.marshal.IntegerType
Index Name: GroupUrlPatternI_patternId_idx
Index Type: KEYS
Compaction Strategy:
org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
{noformat}
I've created empty CF, inserted ~50mil quite small rows, run repair on all four
nodes and left the cluster for few hours idling (lunch, meetings, etc.) Now the
secondary index returns empty result.
I use Hadoop to fill the CF, the patternId value is generated using
ByteBuferUtils.bytes(Integer.valueOf(patternId))
sstable2json on the index CF Data.db file shows a row with key: "0000c7a9"
which is the hex for 51113.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira