Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
See \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::count()
+ \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::$cacheCounts
.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#12 | metatag-n3190804-12.patch | 1.03 KB | DamienMcKenna |
Comments
Comment #2
Wim LeersComment #4
Wim LeersI cannot reproduce those failures. Re-testing against 9.1 in case that makes a difference.
Comment #5
Wim LeersAh, right, this requires #3190815: Source count caching broken: impossible to enable source count caching for SqlBase-based source plugins (plus, unneeded cache I/O) 😬
Comment #6
Wim LeersComment #7
DamienMcKennaThanks for the patch and improvement, I look forward to the core change being committed so we can take advantage of this.
Comment #8
Wim Leers@DamienMcKenna: wow that was fast! 😄
Nit: should be
protected
.Comment #9
Wim Leers#3190815: Source count caching broken: impossible to enable source count caching for SqlBase-based source plugins (plus, unneeded cache I/O) landed! 🥳
Comment #10
DamienMcKennaThis would break compatibility with 8.9, so let's see if we can have both functions.
Comment #11
Wim LeersShould still be changed to
protected
😅Comment #12
DamienMcKennaDoh.
Comment #13
Wim LeersFYI: the two failures in #12 on PHP 8 + Drupal 9.2 are the same two that exist in HEAD: https://www.drupal.org/pift-ci-job/2057145.
Also, the change in #10 + #12 compared to #12 breaks the performance improvement that #3190815: Source count caching broken: impossible to enable source count caching for SqlBase-based source plugins (plus, unneeded cache I/O) made possible.
If you want to support both simultaneously, you'll need to make
count()
smarter: you'll need to update its logic to be conditional depending on the Drupal core version…Comment #14
Wim LeersWith #3190818: Allow source counts to be cached: implement ::doCount() instead of ::count() also committed … and with time having passed … I'm wondering if you'd be willing to commit this without BC layer for Drupal 8.9, @DamienMcKenna?
Comment #15
DamienMcKennaWith Drupal 8 no longer supported, I think this can go in the next release.
Comment #17
DamienMcKennaCommitted. Thank you.