Skip to content

[Elastica] The SyncIndexWithObjectChangeProcessor cannot update an entity more than once #823

Description

@philmoreau

When many updates to the same entity are queued, the SyncIndexWithObjectChangeProcessor will always keep the first representation of an entity that it fetched from Doctrine, causing all subsequent updates to resend exactly the same data.

This happens because Doctrine's manager keeps a cached version of the entity and reuses that version for subsequent calls to "find".

The solution is to clear all managed entities so Doctrine will re-fetch the entity from the database.

I will submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions