CASSANDRA-1545

1. Symptom

After upgrading from 0.7.0beta-2 r997774 to r1000247, got NullPointerException upon cluster startup.

 

Category (in the spreadsheet):

early termination,

1.1 Severity

critical

1.2 Was there exception thrown? (Exception column in the spreadsheet)

yes. java.lang.NullPointerException

 

1.2.1 Were there multiple exceptions?

no 

1.3 Was there a long propagation of the failure?

no

 

1.4 Scope of the failure (e.g., single client, all clients, single file, entire fs, etc.)

entire fs

 

Catastrophic? (spreadsheet column)

no. This is clearly a development mistake. The mistake was found between git revisions. Before release, error like this will be caught for sure.

 

2. How to reproduce this failure

2.0 Version

0.7.0 beta-2 r1000247

2.1 Configuration

standard configuration

 

# of Nodes?

1

2.2 Reproduction procedure

1) start cluster (restart)

 

Num triggering events

1

 

2.2.1 Timing order (Order important column)

NA

2.2.2 Events order externally controllable? (Order externally controllable? column)

yes

2.3 Can the logs tell how to reproduce the failure?

yes        

2.4 How many machines needed?

1

3. Diagnosis procedure

Error msg?

yes

3.1 Detailed Symptom (where you start)

Null pointer exception when starting cluster.

3.2 Backward inference

The developer was trying to jam a null into an int and not an Integer. This probably a silly mistake.

 

4. Root cause

Developer was trying to jam a null into an int and not an Integer.

4.1 Category:

semantic

4.2 Are there multiple fault?

no

4.2 Can we automatically test it?

yes

5. Fix

5.1 How?

Change the way compaction threashold is generated. Do not leave it as null value.

+        Integer minct = cf.min_compaction_threshold == null ? DEFAULT_MIN_COMPACTION_THRESHOLD : cf.min_compaction_threshold;
+        Integer maxct = cf.max_compaction_threshold == null ? DEFAULT_MAX_COMPACTION_THRESHOLD : cf.max_compaction_threshold;