use ReadConcern, not WriteConcern when exporting wind estimation models

This commit is contained in:
Axel Uhl committed 2021-05-27 10:59:39 +02:00
1 parent 6abfa5d083
commit e76eaa9807
1 file changed
+1 -1
@@ -97,7 +97,7 @@ public class MongoDbModelStoreImpl extends AbstractModelStoreImpl {
public Map<String, byte[]> exportAllPersistedModels(ModelDomainType domainType) throws ModelPersistenceException {
Map<String, byte[]> exportedModels = new HashMap<>();
String bucketName = getCollectionName(domainType);
GridFSBucket gridFs = GridFSBuckets.create(db, bucketName).withWriteConcern(WriteConcern.MAJORITY);
GridFSBucket gridFs = GridFSBuckets.create(db, bucketName).withReadConcern(ReadConcern.MAJORITY);
for (GridFSFile gridFSFile : gridFs.find()) {
String fileName = gridFSFile.getFilename();
byte[] exportedModel;