spring-projects / spring-projects/spring-data-mongodb

MultiDatabase Auto Index

Open
#4,488 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
1.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

From this issue:

issue

Now with reproduction:

https://github.com/Lucasark/mongodb-multidata

Behavior:

image

Expected:
Create index only on collection "NewDB1" of model_1, but it created on both collections

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked mongodb-multidata reproduction and inspect the indexes created for model_1 in both collections. Trace Spring Data MongoDB's auto-index creation behavior for multiple databases, then verify that the index is created only on the NewDB1 collection and not on the other collection.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, mongodb, spring
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.