Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-11988

NullPointerException when reading/compacting table

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 3.0.9, 3.8
    • Component/s: Local/Compaction
    • Labels:
      None
    • Severity:
      Normal

      Description

      I have a table that suddenly refuses to be read or compacted. Issuing a read on the table causes a NPE.

      On compaction, it returns the error

      ERROR [CompactionExecutor:6] 2016-06-09 17:10:15,724 CassandraDaemon.java:213 - Exception in thread Thread[CompactionExecutor:6,1,main]
      java.lang.NullPointerException: null
      	at org.apache.cassandra.db.transform.UnfilteredRows.isEmpty(UnfilteredRows.java:38) ~[apache-cassandra-3.6.jar:3.6]
      	at org.apache.cassandra.db.partitions.PurgeFunction.applyToPartition(PurgeFunction.java:64) ~[apache-cassandra-3.6.jar:3.6]
      	at org.apache.cassandra.db.partitions.PurgeFunction.applyToPartition(PurgeFunction.java:24) ~[apache-cassandra-3.6.jar:3.6]
      	at org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:76) ~[apache-cassandra-3.6.jar:3.6]
      	at org.apache.cassandra.db.compaction.CompactionIterator.hasNext(CompactionIterator.java:226) ~[apache-cassandra-3.6.jar:3.6]
      	at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:182) ~[apache-cassandra-3.6.jar:3.6]
      	at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) ~[apache-cassandra-3.6.jar:3.6]
      	at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:82) ~[apache-cassandra-3.6.jar:3.6]
      	at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:60) ~[apache-cassandra-3.6.jar:3.6]
      	at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionCandidate.run(CompactionManager.java:264) ~[apache-cassandra-3.6.jar:3.6]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_45]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_45]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_45]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
      	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
      

      Schema:

      CREATE TABLE cmpayments.report_payments (
          reportid timeuuid,
          userid timeuuid,
          adjustedearnings decimal,
          deleted set<timeuuid> static,
          earnings map<timeuuid, decimal>,
          gross map<timeuuid, decimal>,
          organizationid text,
          payall timestamp static,
          status text,
          PRIMARY KEY (reportid, userid)
      ) WITH CLUSTERING ORDER BY (userid 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';
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                slebresne Sylvain Lebresne
                Reporter:
                nimi Nimi Wariboko Jr.
                Authors:
                Sylvain Lebresne
                Reviewers:
                Carl Yeksigian
              • Votes:
                6 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: