Skip to content

Indexes are not automatically recreated if collection is dropped [DATAMONGO-345] #1278

@spring-projects-issues

Description

@spring-projects-issues

Doug Donohoe opened DATAMONGO-345 and commented

Scenario:

template.dropCollection()
template.insert(obj)

Issue: Indexes are not recreated when the insert happens.

Cause: The MongoPersistentEntityIndexCreator.checkForIndexes call caches the fact it looked at the entity class in classesSeen. This is called first for the dropCollection method. After which, when I go to insert an object, since classesSeen isn't updated, it doesn't know it should recreate the indexes.

Conceptual solution is to notify the MongoPersistentEntityIndexCreator when collections are dropped.


Affects: 1.0 M4

Issue Links:

  • DATAMONGO-660 Index not automatically created
    ("is duplicated by")
  • DATAMONGO-986 Recreate Index when collection gets dropped
    ("is duplicated by")
  • DATAMONGO-1632 Dropped collections do not trigger index creation
    ("is duplicated by")

2 votes, 3 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core supportstatus: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions