mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-18 11:49:09 +00:00
made MongoDBServiceImpl.configuration volatile to ensure setting it is visible to other threads
Change-Id: I5ed2ac2cf57fed8027a653d32c3e309c5c5a5551
This commit is contained in:
@@ -5,7 +5,7 @@ metadata:
|
||||
spec:
|
||||
containers:
|
||||
- name: sailing
|
||||
image: donaldduck70/sapsailing:docker-201812041110
|
||||
image: donaldduck70/sapsailing:docker-201812050126
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8888
|
||||
|
||||
@@ -18,7 +18,11 @@ public class MongoDBServiceImpl implements MongoDBService {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(MongoDBServiceImpl.class.getName());
|
||||
|
||||
private MongoDBConfiguration configuration;
|
||||
/**
|
||||
* Make this volatile to ensure that when an activator writes it in one thread then another
|
||||
* activator can read it.
|
||||
*/
|
||||
private volatile MongoDBConfiguration configuration;
|
||||
|
||||
private final Map<MongoClientURI, Mongo> mongos;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user