Needs work
Project:
Drupal 8 Cache Backport
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
4 Oct 2018 at 18:17 UTC
Updated:
15 Oct 2019 at 21:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
bdragon commentedInitial version of patch.
Still needs a fallback to cope with running without the core patch.
Comment #3
bdragon commentedThis works together with the patch from #3004437: [D7] Add ability to register rootEndTransaction callbacks during transactions.
Comment #4
bdragon commentedAdd backwards compatibility code that falls back to the old implementation when callback support is missing.
Comment #5
fabianx commentedRTBC - I'd like to get this in, so that people can start testing the core patch
Comment #6
stevectorHi Fabian and Brandon! Thanks for working on this issue.
I think
_d8cache_has_transaction_callbacks()is returning the opposite boolean value that it should.Instead of
Shouldn't it be
or just
With these patches applied (and the boolean flipped) I did not get deadlocks.
To replicate the deadlocks I made this branch in Pantheon Advanced Page Cache: https://github.com/pantheon-systems/pantheon_advanced_page_cache/compare... It reuses a previous Behat step I had written to test very long headers. The step saves nodes that reference hundreds of taxonomy terms (just with the free tagging field on the article content type in the Standard profile). By invalidating cache tags for those taxonomy terms and running Behat in two window simultaneously I can reliably replicated the deadlocks.
Comment #7
fabianx commentedGreat catch and thanks for verifying that this indeed solves the deadlocks.
Comment #9
bdragon commentedApologies for the delay, this is in now.
Back to active for documentation.
Comment #11
bdragon commentedReadme updated in 0677a657872141aef5e7239e2e44fd9361b53637 for the interim workaroud.
I'm setting this to Postponed because it will need another update once the native support for post transaction callbacks has landed.
Comment #12
bdragon commentedComment #13
fabianx commentedAdding that this is postponed just on one issue.
Comment #14
bdragon commentedReopening temporarily to handle an update to the API.
Comment #15
fabianx commentedRTBC - Excellent work!
Comment #17
bdragon commentedCommitted API update.
Back to postponed.
Comment #18
fabianx commentedI decided to revert the PR again and support the original API idea instead.
Comment #19
bdragon commentedRework again for readding the $committed parameter.
Comment #20
fabianx commentedRTBC - We decided to change this back, because we got meanwhile consensus in D8 to add the $committed parameter.
Thanks!
Comment #22
bdragon commentedCommitted, back to active.
Comment #23
wim leersFYI: #2966607: Invalidating 'node_list' and other broad cache tags early in a transaction severely increases lock wait time and probability of deadlock just landed.
Comment #24
wim leers