Stratio / cassandra-lucene-index

Lucene based secondary indexes for Cassandra
Apache License 2.0
600 stars 171 forks source link

ReadFailure: Error from server: code=1300 #299

Closed rahuljayz closed 7 years ago

rahuljayz commented 7 years ago

Everything works fine for one table. In the same keyspace, for another table it does not. Details below:

Cassandra version: 3.9 cassandra-lucene-index-plugin-3.9.0

    CREATE TABLE events.task_registry_event(
        partition_key text,
        task_instance_key text,
        timestamp timestamp,
        assignee_key text,
        ...
        lucene text,
        PRIMARY KEY (partition_key, task_instance_key, timestamp)
    ) WITH CLUSTERING ORDER BY (task_instance_key ASC, timestamp ASC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
    AND comment = ''
    AND compaction = {'class': 
        'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 
        'max_threshold': '32', 
        'min_threshold': '4'}
    AND compression = {'chunk_length_in_kb': '64', 
        'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND dclocal_read_repair_chance = 0.1
    AND default_time_to_live = 0
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99PERCENTILE';

    CREATE CUSTOM INDEX task_registry_event_idx 
    ON events.task_registry_event (lucene) 
    USING 'com.stratio.cassandra.lucene.Index' 
     WITH OPTIONS = {
        'indexing_queues_size': '1600', 
        'refresh_seconds': '10', 
        'ram_buffer_mb': '2048', 
        'directory_path': '/opt/iag/event_mgmt/index_events', 
        'indexing_threads': '32', 
        'schema': '{
            fields: {         
                task_instance_key: {type: "string"},
                timestamp: {
                    type : "date", 
                    validated : true, 
                    pattern : "yyyy/MM/dd HH:mm:ss"
                },
                assignee_key: {type: "string"},
                ...
            }
        }'
    };

    SELECT * FROM events.task_registry_event 
    WHERE partition_key='8cd' and lucene = '{
        filter:{type:"match",field:"assignee_key", value:"assignee"}
    }' LIMIT 2;

ReadFailure: Error from server: code=1300 [Replica(s) failed to execute read] message="Operation failed - received 0 responses and 1 failures" info={'failures': 1, 'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'}

ealonsodb commented 7 years ago

Hi @rahuljayz:

When any unknown error happens in cassandra server code and it does not return any rows to client, it returns that 1300 error code. It is not descriptive about the error.

You must look for this error cause in server logs/system.log or logs/debug.log

It is posible to configure a logger for exceptions generated in cassandra-lucene-index classes just adding a new line to the end of $CASSANDRAHOME/conf/logback.xml and restart cassandra.

  <root level="INFO">
    <appender-ref ref="SYSTEMLOG" />
    <appender-ref ref="STDOUT" />
    <appender-ref ref="ASYNCDEBUGLOG" /> <!-- Comment this line to disable debug.log -->
    <!--
    <appender-ref ref="LogbackMetrics" />
    -->
  </root>
**<logger name="com.stratio" level="ERROR"/>**
  <logger name="org.apache.cassandra" level="DEBUG"/>
  <logger name="com.thinkaurelius.thrift" level="ERROR"/>
</configuration>

Does this issue happen in cassandra-lucene-index:3.9.6?

rahuljayz commented 7 years ago

Yes, the problem was somewhere else. You may close this.

devanshdalal commented 6 years ago

hi, what was the problem?

I am getting the same error and struggling for sol badly?

version

icharge commented 6 years ago

This happened to me too! Cassandra version 3.11.1