-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix index creation statements in MongoDB DDL script #4758
Conversation
165d355
to
1586259
Compare
Hi, thank you for the PR! Regarding the syntax issue, which version of mongo db are you using? Is it the same as the one in the integration test?
Indeed, I think the following indexes have duplicate names:
The second one should be something like
yes probably that was missed, the test should include the index creation statements exactly in the same way as in the script Many thanks upfront! |
Hi, thanks for checking this out. Our MongoDB version in use is I'm not sure such syntax is now available in newer version of MongoDB but I'll check if the original ddl script work in 8.0.1 to make it clear. |
de1d271
to
55d678b
Compare
Signed-off-by: yoseplee <yoseplee@linecorp.com>
55d678b
to
9aa49c8
Compare
Hi @fmbenhassine, jobs done. Please review this.
The syntax issue also happens in MongoDB 8.0.1 which version is in the integration test. Referring to the syntax guidance in MongoDB that I linked earlier, the syntax of To clarify this, I run the query in MongoDB 8.0.1 and it eventually failed like below. yosep@AL01983618 run % docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9810389c1c18 mongo:8.0.1 "docker-entrypoint.s…" 2 hours ago Up 2 hours mongodb-container
I've added them into By the way, I somehow feel like all collection names should be used as Consts or something because I found that I was keep copying and pasting them all the time during the work. Collection names are defined among DAO implementations like |
Thank you for checking the syntax and for updating the PR! Appreciated 👍 The changes LGTM now, rebased and merged as a79b6f7.
I agree. What could be better is probably try to load the script from the |
Motivation
createIndex()
was wrong.What I did
createIndex()
query.db.collection.createIndex(<keys>, <options>, <commitQuorum>)
but was likedb.collection.createIncex(<name>, <keys>, <commitQuorum>)
.BATCH_JOB_EXECUTION
collection.Note
What's new in Spring Batch 5.2
might be a good idea.