dcapwell commented on code in PR #4556:
URL: https://github.com/apache/cassandra/pull/4556#discussion_r2748577746


##########
test/distributed/org/apache/cassandra/distributed/impl/CoordinatorHelper.java:
##########
@@ -76,19 +78,28 @@ public static SimpleQueryResult 
unsafeExecuteInternal(String query, ConsistencyL
                                                  requestTime);
             // Collect warnings reported during the query.
             CoordinatorWarnings.done();
-            if (res != null)
-                res.setWarnings(ClientWarn.instance.getWarnings());
+            CoordinatorWriteWarnings.done();
+
+            // Convert null result to ResultMessage.Void, matching 
QueryProcessor.processStatement() behavior
+            // This is necessary to attach warnings to INSERT/UPDATE/DELETE 
statements which return null
+            if (res == null)
+                res = new ResultMessage.Void();
+
+            List<String> warnings = ClientWarn.instance.getWarnings();
+            res.setWarnings(warnings);

Review Comment:
   ```suggestion
               res.setWarnings(ClientWarn.instance.getWarnings());
   ```
   
   Just a nit though



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to