Skip to content

Flush deferred items array on commit #387

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

Merged
merged 1 commit into from
Jul 17, 2021

Conversation

greg0ire
Copy link
Member

@greg0ire greg0ire commented Jul 16, 2021

Once the items have been flushed to the wrapped cache, they should be
removed from the internal buffer so that:

  • they are not flushed again on subsequent calls to commit()
  • the memory they take is freed.

Fixes #386

How can I test this?

composer config repositories.greg0ire vcs https://github.com/greg0ire/cache-1
composer require doctrine/cache "dev-plug-memory-leak as 1.12.0"

or

composer config repositories.greg0ire vcs https://github.com/greg0ire/cache-1
composer require doctrine/cache "dev-plug-memory-leak as 2.1.0"

depending on what you are currently using.

@greg0ire greg0ire added the Bug label Jul 16, 2021
@greg0ire greg0ire requested review from alcaeus and stof July 16, 2021 20:12
@greg0ire greg0ire changed the base branch from 2.1.x to 1.12.x July 16, 2021 22:24

Verified

This commit was signed with the committer’s verified signature.
greg0ire Grégoire Paris
Once the items have been flushed to the wrapped cache, they should be
removed from the internal buffer so that:
- they are not flushed again on subsequent calls to commit()
- the memory they take is freed.

Fixes doctrine#386
@derrabus derrabus added this to the 1.12.1 milestone Jul 16, 2021
@greg0ire greg0ire merged commit 1a36e78 into doctrine:1.12.x Jul 17, 2021
@greg0ire greg0ire deleted the plug-memory-leak branch July 17, 2021 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance degradation due to subsequent commit of deferredItems in PSR6 CacheAdapter
2 participants