Skip to content

Make MongoDB schema scripts idempotent#5339

Open
answndud wants to merge 1 commit intospring-projects:mainfrom
answndud:fix/mongodb-schema-idempotent-5328
Open

Make MongoDB schema scripts idempotent#5339
answndud wants to merge 1 commit intospring-projects:mainfrom
answndud:fix/mongodb-schema-idempotent-5328

Conversation

@answndud
Copy link

Summary

  • make the MongoDB schema scripts idempotent by using upserts for sequence initialization
  • create MongoDB indexes through the JSONL script so rerunning the script keeps the schema in place without resetting state
  • add integration coverage for applying the MongoDB creation script twice and verifying sequence values keep increasing

Testing

  • ./mvnw -pl spring-batch-core -Dtest=MongoDBSchemaScriptsIntegrationTests test
  • Local verification is currently blocked before test execution because this environment does not provide JDK 22 for the projects NullAway JSpecify configuration.

Closes #5328

Signed-off-by: MJY <jmoon0227@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow MongoDB creation scripts to be idempotent

1 participant