frankgh commented on code in PR #14:
URL:
https://github.com/apache/cassandra-analytics/pull/14#discussion_r1343128328
##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/validation/StartupValidator.java:
##########
@@ -33,18 +34,18 @@
public final class StartupValidator
{
private static final Logger LOGGER =
LoggerFactory.getLogger(StartupValidator.class);
- private static final StartupValidator INSTANCE = new StartupValidator();
+ private static final ThreadLocal<StartupValidator> INSTANCE =
ThreadLocal.withInitial(StartupValidator::new);
private static final String DISABLE = "SKIP_STARTUP_VALIDATIONS";
- private final List<StartupValidation> validations = new ArrayList<>();
+ private final List<StartupValidation> validations =
Collections.synchronizedList(new ArrayList<>());
Review Comment:
`CopyOnWriteArrayList` might be more suitable?
--
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]