[
https://issues.apache.org/jira/browse/CASSANDRA-19017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Caleb Rackliffe reassigned CASSANDRA-19017:
-------------------------------------------
Assignee: Andres de la Peña (was: Caleb Rackliffe)
> Ensure that empty SAI column indexes do not fail on validation after
> full-SSTable streaming
> -------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-19017
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19017
> Project: Cassandra
> Issue Type: Bug
> Components: Consistency/Streaming, Feature/SAI
> Reporter: Caleb Rackliffe
> Assignee: Andres de la Peña
> Priority: Normal
> Fix For: 5.0-rc, 5.x
>
>
> I actually discovered this in some exploratory testing for CASSANDRA-19007...
> {noformat}
> @Test
> public void testRepairWithEmptyColumnIndex() throws IOException
> {
> try (Cluster cluster = init(Cluster.build(2).withConfig(config ->
> config.with(GOSSIP).with(NETWORK)).start()))
> {
> cluster.schemaChange(withKeyspace("CREATE TABLE %s.t (k int PRIMARY
> KEY, a int, b int)"));
> cluster.schemaChange(withKeyspace("CREATE INDEX ON %s.t(a) USING
> 'sai'"));
> cluster.schemaChange(withKeyspace("CREATE INDEX ON %s.t(b) USING
> 'sai'"));
> // insert a split row
> cluster.get(1).executeInternal(withKeyspace("INSERT INTO %s.t(k, a)
> VALUES (0, 1)"));
> cluster.get(2).executeInternal(withKeyspace("INSERT INTO %s.t(k, b)
> VALUES (0, 2)"));
> cluster.get(1).flush(KEYSPACE);
> cluster.get(2).flush(KEYSPACE);
> cluster.get(1).nodetoolResult("repair", KEYSPACE).asserts().success();
> // fails w/ no data for the "a" index on node 2!
> }
> }
> {noformat}
> {noformat}
> java.lang.RuntimeException: Repair job has failed with the error message:
> Repair command #1 failed with error Repair session
> 55a34e20-7f24-11ee-b345-d158c708a34e for range [(-1,9223372036854775805],
> (9223372036854775805,-1]] failed with error Stream failed:
> Session peer /127.0.0.2:7012 Failed because of an unknown exception
> java.io.UncheckedIOException: java.nio.file.NoSuchFileException:
> /private/var/folders/4d/zfjs7m7s6x5_l93k33r5k6680000gn/T/dtests2185335212676803469/node1/data0/distributed_test_keyspace/t-3459c6aa21753083afcc5b0c9f77c3f7/distributed_test_keyspace-t-nc-4-big-SAI+aa+t_a_idx+Meta.db
>
> org.apache.cassandra.index.sai.disk.v1.V1OnDiskFormat.rethrowIOException(V1OnDiskFormat.java:241)
>
> org.apache.cassandra.index.sai.disk.v1.V1OnDiskFormat.validatePerColumnIndexComponents(V1OnDiskFormat.java:230)
> java.nio.file.NoSuchFileException:
> /private/var/folders/4d/zfjs7m7s6x5_l93k33r5k6680000gn/T/dtests2185335212676803469/node1/data0/distributed_test_keyspace/t-3459c6aa21753083afcc5b0c9f77c3f7/distributed_test_keyspace-t-nc-4-big-SAI+aa+t_a_idx+Meta.db
>
> java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
>
> java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
> {noformat}
> This is an untested side-effect of a change in CASSANDRA-18670. The fix
> should be fairly simple, essentially making sure we don't assume the column
> index components are present during validation when the index completion
> marker is present.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]