Skip to content

Commit 5cabec2

Browse files
authored
Merge pull request #14 from adrienlauer/indexes-at-startup
Ensure indexes and caps at startup only Cannot build this because it uses personal Travis CI credits. Need to do PR from the official repo only, not the personal one.
2 parents 394a720 + aaab2d6 commit 5cabec2

File tree

65 files changed

+252
-123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+252
-123
lines changed

.travis.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@ cache:
1010
directories:
1111
- "$HOME/.m2/repository"
1212

13+
before_install:
14+
- gpg --fast-import gpg.asc
15+
1316
install:
14-
- echo "<settings><servers><server><id>bintray</id><username>\${env.BINTRAY_USER}</username><password>\${env.BINTRAY_KEY}</password></server></servers></settings>" > ~/.m2/settings.xml
17+
- echo "<settings><servers><server><id>ossrh</id><username>\${env.SONATYPE_USER}</username><password>\${env.SONATYPE_PASSWORD}</password></server></servers></settings>" > ~/.m2/settings.xml
1518
- if [[ $TRAVIS_PULL_REQUEST = false ]] && [[ $TRAVIS_BRANCH = master || $TRAVIS_BRANCH = dev-* ]] || [[ $TRAVIS_TAG = v* ]]; then GOAL=deploy; else GOAL=install; fi
16-
- if [[ $TRAVIS_TAG = v* ]]; then ADDITIONAL_PROFILES=release; mvn -q -U org.seedstack:seedstack-maven-plugin:release; else ADDITIONAL_PROFILES=snapshots; fi
19+
- if [[ $TRAVIS_TAG = v* ]]; then ADDITIONAL_PROFILES=release; mvn -q -U org.seedstack:seedstack-maven-plugin:release; fi
1720

18-
script: mvn -U -Pbuild-number,compatibility,bintray,quality,javadoc,$ADDITIONAL_PROFILES $GOAL jacoco:report
21+
script: mvn -U -Pbuild-number,compatibility,javadoc,quality,$ADDITIONAL_PROFILES $GOAL
1922

2023
after_success: mvn -q coveralls:report -DrepoToken=$COVERALLS_TOKEN

CHANGELOG.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Version 3.1.3 (2021-07-31)
2+
3+
* [fix] Avoid calling `ensureIndexes()` and `ensureCaps()` for each datastore instantiation which adds a considerable
4+
overhead in some circumstances. It is now done at application startup and can be controlled with
5+
`mongoDb.morphia.ensureCapsAtStartup` and `mongoDb.morphia.ensureIndexesAtStartup` config options.
6+
17
# Version 3.1.2 (2020-08-05)
28

39
* [chg] Updated for seed 3.10+
@@ -8,21 +14,24 @@
814

915
# Version 3.1.0 (2020-01-31)
1016

11-
* [new] Morphia repository now has the ability to stream results from the database as consumed (using a cursor instead of a list behind the scenes).
17+
* [new] Morphia repository now has the ability to stream results from the database as consumed (using a cursor instead
18+
of a list behind the scenes).
1219
* [chg] Update the Morphia module to work with business framework 4.3.0+.
13-
* [chg] Updated Morphia to 1.5.8 (its package has changed to `dev.morphia`, update project code accordingly if necessary).
20+
* [chg] Updated Morphia to 1.5.8 (its package has changed to `dev.morphia`, update project code accordingly if
21+
necessary).
1422

1523
# Version 3.0.2 (2019-01-10)
1624

17-
* [fix] Fix issue #11: an exception occurred at startup because the way of accessing the ValidationFactory changed.
25+
* [fix] Fix issue #11: an exception occurred at startup because the way of accessing the ValidationFactory changed.
1826

1927
# Version 3.0.1 (2019-01-10)
2028

21-
* [fix] During translation of composite specifications (or, and), set the field for each member (avoid "No field has been set" exception).
29+
* [fix] During translation of composite specifications (or, and), set the field for each member (avoid "No field has
30+
been set" exception).
2231

2332
# Version 3.0.0 (2017-11-30)
2433

25-
* [new] Implements automatic translation of business specifications to Morphia queries.
34+
* [new] Implements automatic translation of business specifications to Morphia queries.
2635

2736
# Version 2.0.0 (2017-01-13)
2837

@@ -31,7 +40,8 @@
3140
# Version 1.1.0 (2016-04-26)
3241

3342
* [new] Automatically build indexes
34-
* [new] Add Bean Validation support to Morphia (at pre-persist) when SeedStack validation add-on is present in the classpath.
43+
* [new] Add Bean Validation support to Morphia (at pre-persist) when SeedStack validation add-on is present in the
44+
classpath.
3545
* [new] Add `exists()` and `count()` in `BaseMorphiaRepository` according to change in business framework.
3646
* [chg] Update for SeedStack 16.4.
3747
* [brk] Remove `do*()` methods in `BaseMorphiaRepository` according to change in business framework.

checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<!--
33
4-
Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
4+
Copyright © 2013-2021, The SeedStack authors <http://seedstack.org>
55
66
This Source Code Form is subject to the terms of the Mozilla Public
77
License, v. 2.0. If a copy of the MPL was not distributed with this

core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
3-
Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
3+
Copyright © 2013-2021, The SeedStack authors <http://seedstack.org>
44
55
This Source Code Form is subject to the terms of the Mozilla Public
66
License, v. 2.0. If a copy of the MPL was not distributed with this

core/src/main/java/org/seedstack/mongodb/MongoDbConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
2+
* Copyright © 2013-2021, The SeedStack authors <http://seedstack.org>
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this

core/src/main/java/org/seedstack/mongodb/internal/AbstractMongoDbManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
2+
* Copyright © 2013-2021, The SeedStack authors <http://seedstack.org>
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this

core/src/main/java/org/seedstack/mongodb/internal/AsyncMongoDbManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
2+
* Copyright © 2013-2021, The SeedStack authors <http://seedstack.org>
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this

core/src/main/java/org/seedstack/mongodb/internal/MongoDbErrorCode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
2+
* Copyright © 2013-2021, The SeedStack authors <http://seedstack.org>
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this

core/src/main/java/org/seedstack/mongodb/internal/MongoDbManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
2+
* Copyright © 2013-2021, The SeedStack authors <http://seedstack.org>
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this

core/src/main/java/org/seedstack/mongodb/internal/MongoDbModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
2+
* Copyright © 2013-2021, The SeedStack authors <http://seedstack.org>
33
*
44
* This Source Code Form is subject to the terms of the Mozilla Public
55
* License, v. 2.0. If a copy of the MPL was not distributed with this

0 commit comments

Comments
 (0)