You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Andres de la Peña (Jira)" <ji...@apache.org> on 2023/11/15 16:06:00 UTC
[jira] [Comment Edited] (CASSANDRA-19017) Ensure that empty SAI column indexes do not fail on validation after full-SSTable streaming
[ https://issues.apache.org/jira/browse/CASSANDRA-19017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17786390#comment-17786390 ]
Andres de la Peña edited comment on CASSANDRA-19017 at 11/15/23 4:05 PM:
-------------------------------------------------------------------------
I guess it would be something like this:
||PR||CI||
|[5.0 |https://github.com/apache/cassandra/compare/trunk...adelapena:19017-5.0]|[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/3309/workflows/05e582c2-b9d9-4c77-bd8b-53899a84132e] [j17|https://app.circleci.com/pipelines/github/adelapena/cassandra/3308/workflows/cb9f5182-1983-47a6-9b3c-fa56a4ef4e28]|
Since the column completion marker now has contents, it also gets a header and a footer, so we can check its possible corruption.
was (Author: adelapena):
I guess it would be something like this:
||PR||CI||
|[5.0 |https://github.com/apache/cassandra/compare/trunk...adelapena:19017-5.0]|[j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/3309/workflows/05e582c2-b9d9-4c77-bd8b-53899a84132e]|
Since the column completion marker now has contents, it also gets a header and a footer, so we can check its possible corruption.
> 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: Caleb Rackliffe
> 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: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org