mike-tr-adamson commented on code in PR #2689:
URL: https://github.com/apache/cassandra/pull/2689#discussion_r1332841938
##########
src/java/org/apache/cassandra/io/sstable/format/SSTableWriter.java:
##########
@@ -98,11 +107,63 @@ protected SSTableWriter(Builder<?, ?> builder,
LifecycleNewTracker lifecycleNewT
this.isTransient = builder.isTransientSSTable();
this.metadataCollector = builder.getMetadataCollector();
this.header = builder.getSerializationHeader();
- this.observers = builder.getFlushObservers();
this.mmappedRegionsCache = builder.getMmappedRegionsCache();
this.lifecycleNewTracker = lifecycleNewTracker;
+ ArrayList<SSTableFlushObserver> observers = new ArrayList<>();
+ this.observers = Collections.unmodifiableList(observers);
Review Comment:
nit: Couldn't these 2 lines move down to above the `try` below that
populates the observers. I find reading the code that flicking up and down is
painful.
--
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]