maedhroz commented on code in PR #2492:
URL: https://github.com/apache/cassandra/pull/2492#discussion_r1264354687


##########
src/java/org/apache/cassandra/io/sstable/format/SSTableWriter.java:
##########
@@ -226,12 +226,15 @@ public final Throwable commit(Throwable accumulate)
     {
         try
         {
-            return txnProxy.commit(accumulate);
+            observers.forEach(SSTableFlushObserver::complete);
         }
-        finally
+        catch (Throwable t)
         {
-            observers.forEach(SSTableFlushObserver::complete);
+            // Return without advancing to COMMITTED, which will trigger 
abort() when the Transactional closes...
+            return Throwables.merge(accumulate, t);
         }
+
+        return txnProxy.commit(accumulate);

Review Comment:
   The change here in some way mirrors what already happens for streaming and 
what now happens for import in this patch. We make sure index components are 
complete before proceeding w/ making the related SSTables visible for reads, 
etc.



-- 
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