frankgh commented on code in PR #72:
URL: 
https://github.com/apache/cassandra-analytics/pull/72#discussion_r1711847494


##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/RecordWriter.java:
##########
@@ -184,6 +184,10 @@ public WriteResult write(Iterator<Tuple2<DecoratedKey, 
Object[]>> sourceIterator
             Range<BigInteger> currentRange = subRanges.get(currentRangeIndex);
             while (dataIterator.hasNext())
             {
+                if (streamSession != null)
+                {
+                    streamSession.throwIfLastStreamFailed();

Review Comment:
   fair enough. My concern is doing the check on a tight loop for every 
iteration. I guess we could think of ways of just checking every x writes with 
the downside of doing extra work if an error occurred during the previous 
streaming session. My suggestion does not address the concern, it was more a 
style change. 



-- 
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: commits-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to