[
https://issues.apache.org/jira/browse/CASSANDRA-16214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Caleb Rackliffe updated CASSANDRA-16214:
----------------------------------------
Test and Documentation Plan:
- changes to {{DataOutputBuffer}} should be more or less covered by the
associated changes in {{DataOutputTest}}
- the changes to the read response creation an compaction logic I've tested
manually via a simple test that looks roughly like this, coupled with
hard-coding the max array size in {{DataOutputTest}}:
{noformat}
@Test
public void testLargeRowSerialization() throws Throwable
{
try (ICluster<?> cluster = init(builder().withNodes(2).start(), 1))
{
cluster.schemaChange("CREATE TABLE " + KEYSPACE + ".tbl (pk int, ck
int, a text, b text, PRIMARY KEY (pk, ck)) WITH compaction = { 'class' :
'LeveledCompactionStrategy', 'enabled' : false }");
StringBuilder builder = new StringBuilder();
for (int i = 0; i < LARGE_MESSAGE_THRESHOLD ; i++)
builder.append('a');
String bigString = builder.toString();
cluster.coordinator(1).execute("INSERT INTO " + KEYSPACE + ".tbl (pk,
ck, a) VALUES (1, 1, ?)", ConsistencyLevel.ALL, bigString);
cluster.get(1).flush(KEYSPACE);
cluster.coordinator(1).execute("INSERT INTO " + KEYSPACE + ".tbl (pk,
ck, b) VALUES (1, 1, ?)", ConsistencyLevel.ALL, bigString);
cluster.get(1).flush(KEYSPACE);
assertRows(cluster.coordinator(1).execute("SELECT * FROM " + KEYSPACE +
".tbl WHERE pk = ?", ConsistencyLevel.ALL, 1),
row(1, 1, bigString, bigString));
}
}
{noformat}
Status: Patch Available (was: In Progress)
[patch|https://github.com/apache/cassandra/pull/781]
[CircleCI
j8|https://app.circleci.com/pipelines/github/maedhroz/cassandra/132/workflows/4b76d698-85ef-4a51-8d35-92283a0ecab2]
[CircleCI
j11|https://app.circleci.com/pipelines/github/maedhroz/cassandra/132/workflows/3663f4ed-0dd0-49ab-bac2-e74716d62d8c]
> Improve Logging Downstream of DataOutputBuffer Overflows
> --------------------------------------------------------
>
> Key: CASSANDRA-16214
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16214
> Project: Cassandra
> Issue Type: Improvement
> Components: Observability/Logging
> Reporter: Caleb Rackliffe
> Assignee: Caleb Rackliffe
> Priority: Normal
> Fix For: 4.0-beta
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> There are a number of codepaths that buffer intermediate representations of a
> partition in memory in a {{DataOutputBuffer}}. Compactions and reads
> (involving multiple SSTables) can both produce partitions whose serialized
> size is larger than {{MAX_ARRAY_SIZE}}, in which case a {{RuntimeException}}
> and really not much else makes it to the logs. We should be able to improve
> this so that at least the offending keyspace, table, and partition are logged.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]