GWphua commented on code in PR #18470:
URL: https://github.com/apache/druid/pull/18470#discussion_r2317703085
##########
server/src/main/java/org/apache/druid/server/coordination/SegmentBootstrapper.java:
##########
@@ -195,7 +195,7 @@ private void loadSegmentsOnStartup() throws IOException
final int numSegments = segmentsOnStartup.size();
final CountDownLatch latch = new CountDownLatch(numSegments);
final AtomicInteger counter = new AtomicInteger(0);
- final CopyOnWriteArrayList<DataSegment> failedSegments = new
CopyOnWriteArrayList<>();
+ final ConcurrentLinkedQueue<DataSegment> failedSegments = new
ConcurrentLinkedQueue<>();
Review Comment:
> Given that only ever add to this list,
`failSegments` will also get converted to a ArrayList subsequently in here.
```
log.makeAlert("[%,d] errors seen while loading segments on startup",
failedSegments.size())
.addData("failedSegments", failedSegments)
.emit();
```
Honestly, not an issue too. I'm ambivalent about both options.
Would we prefer working with a HashSet here?
--
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]