[ https://issues.apache.org/jira/browse/CASSANDRA-20397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Caleb Rackliffe updated CASSANDRA-20397: ---------------------------------------- Fix Version/s: 4.0.18 4.1.9 5.0.4 5.1 (was: 5.x) (was: 4.0.x) (was: 4.1.x) (was: 5.0.x) Since Version: 4.0.0 Source Control Link: https://github.com/apache/cassandra/commit/f375a3914f9e322e11ac30b2ea2999ff14bb65d4 Resolution: Fixed Status: Resolved (was: Ready to Commit) > FQL does not handle explicit null/tombstones in prepared statements > ------------------------------------------------------------------- > > Key: CASSANDRA-20397 > URL: https://issues.apache.org/jira/browse/CASSANDRA-20397 > Project: Apache Cassandra > Issue Type: Bug > Components: Tool/fql > Reporter: Caleb Rackliffe > Assignee: Caleb Rackliffe > Priority: Normal > Fix For: 4.0.18, 4.1.9, 5.0.4, 5.1 > > Attachments: ci_summary-1.html, ci_summary-2.html, ci_summary-3.html, > ci_summary.html, result_details.tar.gz > > Time Spent: 50m > Remaining Estimate: 0h > > FQL will throw an NPE if it attempts to record a successful batch operation > containing a null bind value, which we obviously interpret as a tombstone. > This means it will be missing from any subsequent dump and completely ignored > by replay. > {noformat} > ERROR [node1_Binary Log thread:1] 2025-03-04 14:23:15,372 BinLog.java:271 - > Unexpected exception in binary log thread > java.lang.NullPointerException: null > at net.openhft.chronicle.bytes.BytesStore.wrap(BytesStore.java:131) > at > org.apache.cassandra.fql.FullQueryLogger$Batch.writeMarshallablePayload(FullQueryLogger.java:459) > at > org.apache.cassandra.utils.binlog.BinLog$ReleaseableWriteMarshallable.writeMarshallable(BinLog.java:364) > at > net.openhft.chronicle.wire.MarshallableOut.writeDocument(MarshallableOut.java:152) > at > org.apache.cassandra.utils.binlog.BinLog.processTasks(BinLog.java:250) > at org.apache.cassandra.utils.binlog.BinLog.run(BinLog.java:267) > {noformat} > The following quick test should hit it... > {noformat} > @Test > public void test() throws InterruptedException > { > CLUSTER.get(1).nodetool("enablefullquerylog", "--path", > temporaryFolder.getRoot().getAbsolutePath()); > com.datastax.driver.core.Cluster.Builder builder1 = > > com.datastax.driver.core.Cluster.builder().addContactPoint("127.0.0.1"); > try (com.datastax.driver.core.Cluster cluster1 = builder1.build(); > Session session1 = cluster1.connect()) > { > BatchStatement batch = new > BatchStatement(BatchStatement.Type.UNLOGGED); > PreparedStatement preparedWrite = session1.prepare("INSERT INTO " > + KS_TBL + " (k, c, s) VALUES ( ?, ?, ?)"); > batch.add(preparedWrite.bind(0, 0, null)); > assertTrue(session1.execute(batch).wasApplied()); > } > CLUSTER.get(1).nodetool("disablefullquerylog"); > ToolRunner.ToolResult negativeRunner = > ToolRunner.invokeClass("org.apache.cassandra.fqltool.FullQueryLogTool", > "dump", temporaryFolder.getRoot().getAbsolutePath()); > System.err.println(negativeRunner.getStdout()); > } > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org