Mark Dewey created CASSANDRA-9116: ------------------------------------- Summary: Indexes lost on upgrading to 2.1.4 Key: CASSANDRA-9116 URL: https://issues.apache.org/jira/browse/CASSANDRA-9116 Project: Cassandra Issue Type: Bug Components: Core Reporter: Mark Dewey Priority: Blocker Fix For: 2.1.5
How to reproduce: # Create a 2.0.12 cluster # Create the following keyspace/table (or something similar, it's primarily the indexes that matter to this case afaict) {noformat} CREATE KEYSPACE tshirts WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': '1'} AND durable_writes = true; CREATE TABLE tshirts.tshirtorders ( store text, order_time timestamp, order_number uuid, color text, qty int, size text, PRIMARY KEY (store, order_time, order_number) ) WITH CLUSTERING ORDER BY (order_time ASC, order_number ASC) AND bloom_filter_fp_chance = 0.01 AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}' AND comment = '' AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32'} AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'} 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 = '99.0PERCENTILE'; CREATE INDEX color ON tshirts.tshirtorders (color); CREATE INDEX size ON tshirts.tshirtorders (size); {noformat} # Load it with data # Stop the node (one node cluster is enough to replicate) # Upgrade the node to 2.1.4 # Start the node # Optional: Run nodetool upgradesstables # Run the following queries: {noformat} SELECT * FROM tshirts.tshirtorders WHERE store = 'store 65'; SELECT store, color, qty, size FROM tshirts.tshirtorders WHERE store = 'store 65' AND color = 'red'; {noformat} No rows containing will appear in the indexed table. Sample output: {noformat} cqlsh> SELECT * FROM tshirts.tshirtorders WHERE store = 'store 65'; store | order_time | order_number | color | qty | size ----------+--------------------------+--------------------------------------+--------+------+------ store 65 | 2000-01-03 18:20:20+0000 | 457e60e6-da39-11e4-add3-42010af08298 | red | 1295 | M store 65 | 2000-01-04 01:29:21+0000 | 45947304-da39-11e4-add3-42010af08298 | grey | 2805 | M store 65 | 2000-01-04 19:55:51+0000 | 45d69220-da39-11e4-add3-42010af08298 | brown | 3380 | XXXL store 65 | 2000-01-04 22:45:07+0000 | 45e16894-da39-11e4-add3-42010af08298 | yellow | 7000 | XXL store 65 | 2000-01-05 17:09:56+0000 | 46083bd6-da39-11e4-add3-42010af08298 | purple | 2440 | S store 65 | 2000-01-05 19:16:48+0000 | 460cadd8-da39-11e4-add3-42010af08298 | green | 5690 | L store 65 | 2000-01-06 00:26:06+0000 | 461ccdbc-da39-11e4-add3-42010af08298 | brown | 9890 | P store 65 | 2000-01-06 11:35:11+0000 | 4633aa00-da39-11e4-add3-42010af08298 | black | 9350 | P store 65 | 2000-01-07 06:07:20+0000 | 4658e0ea-da39-11e4-add3-42010af08298 | black | 1300 | S store 65 | 2000-01-07 06:47:40+0000 | 465be93e-da39-11e4-add3-42010af08298 | purple | 9630 | XL store 65 | 2000-01-09 12:42:38+0000 | 46bafdd4-da39-11e4-add3-42010af08298 | purple | 1470 | M store 65 | 2000-01-09 19:07:35+0000 | 46c43e08-da39-11e4-add3-42010af08298 | pink | 6005 | S store 65 | 2000-01-10 04:47:56+0000 | 46d4b170-da39-11e4-add3-42010af08298 | red | 345 | XL store 65 | 2000-01-10 20:25:44+0000 | 46ef7d52-da39-11e4-add3-42010af08298 | pink | 420 | XXL store 65 | 2000-01-11 00:55:27+0000 | 46f7a84c-da39-11e4-add3-42010af08298 | purple | 9045 | S store 65 | 2000-01-11 17:54:25+0000 | 4724ea00-da39-11e4-add3-42010af08298 | green | 5030 | XXL store 65 | 2000-01-12 08:21:15+0000 | 473c0370-da39-11e4-add3-42010af08298 | white | 2860 | XL store 65 | 2000-01-12 17:09:19+0000 | 47497d2a-da39-11e4-add3-42010af08298 | red | 6425 | L store 65 | 2000-01-14 07:27:37+0000 | 478662a8-da39-11e4-add3-42010af08298 | pink | 330 | XXXL store 65 | 2000-01-14 11:31:38+0000 | 478b43cc-da39-11e4-add3-42010af08298 | pink | 3335 | XXL store 65 | 2000-01-14 18:55:59+0000 | 47955a24-da39-11e4-add3-42010af08298 | yellow | 500 | P store 65 | 2000-01-15 01:59:52+0000 | 479f0c5e-da39-11e4-add3-42010af08298 | red | 8415 | XL store 65 | 2000-01-15 02:26:13+0000 | 47a00c08-da39-11e4-add3-42010af08298 | green | 2265 | P store 65 | 2000-01-15 14:31:50+0000 | 47b28c34-da39-11e4-add3-42010af08298 | green | 8165 | M store 65 | 2000-01-16 20:39:31+0000 | 47de6908-da39-11e4-add3-42010af08298 | purple | 1330 | XXL store 65 | 2000-01-17 06:02:33+0000 | 47eb832c-da39-11e4-add3-42010af08298 | black | 9495 | M store 65 | 2000-01-17 12:32:09+0000 | 47f4ca18-da39-11e4-add3-42010af08298 | grey | 4645 | L store 65 | 2000-01-18 02:46:05+0000 | 48080c9a-da39-11e4-add3-42010af08298 | pink | 5220 | L store 65 | 2000-01-18 22:38:49+0000 | 48271c0c-da39-11e4-add3-42010af08298 | red | 3515 | XL store 65 | 2000-01-19 05:14:17+0000 | 48311860-da39-11e4-add3-42010af08298 | black | 8970 | P store 65 | 2000-01-19 09:15:57+0000 | 48368a8e-da39-11e4-add3-42010af08298 | red | 6110 | P store 65 | 2000-01-20 07:48:34+0000 | 485a21ec-da39-11e4-add3-42010af08298 | green | 9455 | XXXL store 65 | 2000-01-22 23:03:05+0000 | 48b94686-da39-11e4-add3-42010af08298 | red | 5370 | P store 65 | 2000-01-23 00:15:27+0000 | 48bb7a32-da39-11e4-add3-42010af08298 | green | 2465 | S store 65 | 2000-01-23 03:40:35+0000 | 48c10eb6-da39-11e4-add3-42010af08298 | red | 795 | P store 65 | 2000-01-23 20:52:24+0000 | 48db904c-da39-11e4-add3-42010af08298 | brown | 9690 | XL store 65 | 2000-01-23 23:52:08+0000 | 48df5f24-da39-11e4-add3-42010af08298 | blue | 9330 | S store 65 | 2000-01-25 06:10:55+0000 | 490ae194-da39-11e4-add3-42010af08298 | pink | 2380 | M store 65 | 2000-01-25 14:04:42+0000 | 4914777c-da39-11e4-add3-42010af08298 | purple | 8425 | S store 65 | 2000-01-25 20:31:39+0000 | 491da19e-da39-11e4-add3-42010af08298 | brown | 70 | M store 65 | 2000-01-26 09:33:27+0000 | 4932033c-da39-11e4-add3-42010af08298 | green | 8150 | L store 65 | 2000-01-28 10:18:38+0000 | 4976c38c-da39-11e4-add3-42010af08298 | pink | 3175 | XXL store 65 | 2000-01-31 00:22:38+0000 | 49d37fbe-da39-11e4-add3-42010af08298 | black | 8310 | XL store 65 | 2000-01-31 11:21:25+0000 | 49e2fcdc-da39-11e4-add3-42010af08298 | white | 6240 | XXXL store 65 | 2000-01-31 16:22:50+0000 | 49e9904c-da39-11e4-add3-42010af08298 | green | 8310 | XXXL store 65 | 2000-01-31 17:12:11+0000 | 49eac6ce-da39-11e4-add3-42010af08298 | grey | 4315 | XL store 65 | 2000-02-01 13:42:19+0000 | 4a086486-da39-11e4-add3-42010af08298 | white | 6955 | XXXL store 65 | 2000-02-03 09:21:18+0000 | 4a47abbe-da39-11e4-add3-42010af08298 | white | 5360 | P store 65 | 2000-02-03 21:09:39+0000 | 4a58acde-da39-11e4-add3-42010af08298 | pink | 8665 | P store 65 | 2000-02-04 17:57:51+0000 | 4a77aa76-da39-11e4-add3-42010af08298 | brown | 8550 | L store 65 | 2000-02-04 21:37:13+0000 | 4a7cdc26-da39-11e4-add3-42010af08298 | black | 9195 | P store 65 | 2000-02-05 20:35:33+0000 | 4a9fc81c-da39-11e4-add3-42010af08298 | brown | 4460 | M store 65 | 2000-02-06 03:28:23+0000 | 4aaa30ae-da39-11e4-add3-42010af08298 | pink | 4175 | M store 65 | 2000-02-06 07:45:29+0000 | 4ab0cd4c-da39-11e4-add3-42010af08298 | yellow | 5270 | M store 65 | 2000-02-06 07:47:06+0000 | 4ab100d2-da39-11e4-add3-42010af08298 | grey | 165 | P store 65 | 2000-02-06 20:21:10+0000 | 4ac434e0-da39-11e4-add3-42010af08298 | black | 5480 | P store 65 | 2000-02-07 01:49:04+0000 | 4acca18e-da39-11e4-add3-42010af08298 | green | 7520 | L store 65 | 2000-02-07 17:02:03+0000 | 4ae1a2fa-da39-11e4-add3-42010af08298 | purple | 5630 | P store 65 | 2000-02-09 09:46:37+0000 | 4b1bcc28-da39-11e4-add3-42010af08298 | yellow | 6985 | S store 65 | 2000-02-09 19:08:30+0000 | 4b2a10bc-da39-11e4-add3-42010af08298 | blue | 7505 | M store 65 | 2000-02-10 02:23:35+0000 | 4b35e428-da39-11e4-add3-42010af08298 | blue | 730 | M store 65 | 2000-02-10 16:12:10+0000 | 4b49dad2-da39-11e4-add3-42010af08298 | brown | 9940 | XL store 65 | 2000-02-12 05:10:22+0000 | 4b7c430a-da39-11e4-add3-42010af08298 | yellow | 3890 | S store 65 | 2000-02-14 20:16:52+0000 | 4bd9cb42-da39-11e4-add3-42010af08298 | green | 5335 | XL store 65 | 2000-02-14 22:40:38+0000 | 4bdcfb3c-da39-11e4-add3-42010af08298 | green | 2370 | XXXL store 65 | 2000-02-15 17:30:08+0000 | 4bf6c45e-da39-11e4-add3-42010af08298 | red | 6875 | L store 65 | 2000-02-16 15:19:40+0000 | 4c16783a-da39-11e4-add3-42010af08298 | pink | 7880 | XL store 65 | 2000-02-17 05:01:18+0000 | 4c2aab20-da39-11e4-add3-42010af08298 | white | 160 | XL store 65 | 2000-02-17 06:45:08+0000 | 4c2d66d0-da39-11e4-add3-42010af08298 | brown | 6005 | XXXL store 65 | 2000-02-17 08:43:02+0000 | 4c302f8c-da39-11e4-add3-42010af08298 | purple | 4970 | L store 65 | 2000-02-17 21:10:53+0000 | 4c44dea0-da39-11e4-add3-42010af08298 | white | 9530 | M store 65 | 2000-02-18 01:57:35+0000 | 4c4c55e0-da39-11e4-add3-42010af08298 | blue | 5695 | M store 65 | 2000-02-18 06:56:21+0000 | 4c53c50a-da39-11e4-add3-42010af08298 | red | 9705 | S store 65 | 2000-02-18 07:52:10+0000 | 4c555f78-da39-11e4-add3-42010af08298 | black | 5205 | XXL store 65 | 2000-02-20 07:01:49+0000 | 4ca0db9c-da39-11e4-add3-42010af08298 | pink | 2645 | S store 65 | 2000-02-20 07:48:56+0000 | 4ca244be-da39-11e4-add3-42010af08298 | brown | 2465 | XXXL store 65 | 2000-02-21 03:55:08+0000 | 4cc08474-da39-11e4-add3-42010af08298 | red | 4095 | M store 65 | 2000-02-21 07:25:29+0000 | 4cc5c736-da39-11e4-add3-42010af08298 | pink | 7200 | XXXL store 65 | 2000-02-21 23:08:29+0000 | 4cdba1b4-da39-11e4-add3-42010af08298 | brown | 9190 | M store 65 | 2000-02-21 23:08:56+0000 | 4cdbd832-da39-11e4-add3-42010af08298 | green | 7895 | XXL store 65 | 2000-02-23 00:17:30+0000 | 4d021ba0-da39-11e4-add3-42010af08298 | pink | 3955 | XXXL store 65 | 2000-02-23 04:40:20+0000 | 4d083b5c-da39-11e4-add3-42010af08298 | blue | 6435 | XXL store 65 | 2000-02-23 13:23:49+0000 | 4d1651c4-da39-11e4-add3-42010af08298 | purple | 2595 | S store 65 | 2000-02-24 14:51:42+0000 | 4d3b4e3e-da39-11e4-add3-42010af08298 | purple | 5685 | M store 65 | 2000-02-24 15:07:04+0000 | 4d3b805c-da39-11e4-add3-42010af08298 | brown | 5045 | S store 65 | 2000-02-24 22:04:02+0000 | 4d44af74-da39-11e4-add3-42010af08298 | pink | 6780 | L store 65 | 2000-02-25 00:53:13+0000 | 4d4910be-da39-11e4-add3-42010af08298 | green | 1285 | XXL store 65 | 2000-02-26 03:48:24+0000 | 4d729498-da39-11e4-add3-42010af08298 | red | 1895 | XXL store 65 | 2000-02-26 08:17:34+0000 | 4d7a717c-da39-11e4-add3-42010af08298 | brown | 6400 | M store 65 | 2000-02-26 17:41:23+0000 | 4d897d02-da39-11e4-add3-42010af08298 | white | 5870 | S store 65 | 2000-02-26 21:18:35+0000 | 4d8fbfbe-da39-11e4-add3-42010af08298 | green | 265 | P store 65 | 2000-02-26 23:51:47+0000 | 4d93bc40-da39-11e4-add3-42010af08298 | grey | 3950 | XXXL store 65 | 2000-02-27 09:34:06+0000 | 4da1b480-da39-11e4-add3-42010af08298 | white | 1150 | XXL store 65 | 2000-02-27 13:22:07+0000 | 4da87716-da39-11e4-add3-42010af08298 | pink | 3395 | XXL store 65 | 2000-02-27 16:49:46+0000 | 4dada0f6-da39-11e4-add3-42010af08298 | blue | 1430 | XXL (97 rows) cqlsh> SELECT store, color, qty, size FROM tshirts.tshirtorders WHERE store = 'store 65' AND color = 'red'; store | order_time | order_number | color | qty | size -------+------------+--------------+-------+-----+------ (0 rows) {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)