Problem/Motivation

\Drupal\Core\Cache\ChainedFastBackend throws errors, which is problematic as its used early in the bootstrap

PHP Fatal error: Consistent cache backend and fast cache backend cannot use the same service. in /home/user/www/site/docroot/core/lib/Drupal/Core/Cache/ChainedFastBackend.php on line 98

Stacktrace

Steps to reproduce

  1. Checkout 8.1.x
  2. Install syslog
  3. Checkout 8.2.x
  4. Boom

Proposed resolution

* Fallthrough instead of throwing an error/exception

Remaining tasks

User interface changes

API changes

Data model changes

Comments

dawehner created an issue. See original summary.

dawehner’s picture

Issue summary: View changes
dawehner’s picture

Status: Active » Needs review
StatusFileSize
new2.74 KB

Here is an idea we had yesterday

Status: Needs review » Needs work

The last submitted patch, 3: 2808569-3.patch, failed testing.

alexpott’s picture

Status: Needs work » Closed (won't fix)
Related issues: +#2751847: Throw exception if the same service is injected twice in ChainedFastBackend

I've reverted #2751847: Throw exception if the same service is injected twice in ChainedFastBackend because obviously we shouldn't be having criticals a result of normals or majors.

chx’s picture

Version: 8.3.x-dev » 8.2.x-dev
Status: Closed (won't fix) » Needs review
StatusFileSize
new2.74 KB

This applies to 8.2.x just fine and it's 8.2.x which needs this before release. The problem is the trigger_error() in __construct.

Please do not credit me, I have changed nothing I am just reposting it under 8.2.x.

dawehner’s picture

@alexpott
No matter whether we revert it or not, but seriously we need to solve the problem of the broken configuration.

alexpott’s picture

@dawehner well we can't revert a patch in 8.1.x so I think we need to proceed here.

alexpott’s picture

Priority: Critical » Major

After discussing with @catch decided to revert #2662844: cache.backend.chainedfast misbehaves when both fast and consistent backends point to the same storage on 8.2.x and 8.3.x so this is no longer critical.

penyaskito’s picture

Status: Needs review » Needs work
+++ b/core/lib/Drupal/Core/Cache/ChainedFastBackend.php
@@ -79,6 +79,13 @@ class ChainedFastBackend implements CacheBackendInterface, CacheTagsInvalidatorI
   /**
+   * Stores whether the chained fast backend configuration was wrong.
+   *
+   * @var bool
+   */
+  protected $brokenConfiguration = FALSE;

Very creative, thanks. I love it. But if we come to this code in 6 months we may not remember why we did this. Can we add a comment? Something as in
"We cannot throw an exception in the constructor because we may need the services container for logging out errors."

dawehner’s picture

Status: Needs work » Needs review
Issue tags: +Needs tests
StatusFileSize
new2.93 KB
new1.05 KB

Just a small adaption.

But seriously, we need a patch

Status: Needs review » Needs work

The last submitted patch, 11: 2808569-11.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new2.75 KB

Did some reroll here.

anavarre’s picture

Version: 8.2.x-dev » 8.3.x-dev

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

anavarre’s picture

Status: Needs review » Needs work

Is this still a thing?

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

narendra.rajwar27’s picture

Assigned: Unassigned » narendra.rajwar27
narendra.rajwar27’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new2.68 KB
narendra.rajwar27’s picture

Assigned: narendra.rajwar27 » Unassigned
narendra.rajwar27’s picture

StatusFileSize
new2.58 KB

Interdiff of above patch.

narendra.rajwar27’s picture

StatusFileSize
new2.44 KB

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +Bug Smash Initiative, +Needs steps to reproduce
StatusFileSize
new34.36 KB

This was a bugsmash triage target yesterday. It was discussed by acbramley, lendude and mstrelan.

The first question was 'is this still a problem'? Plus, the steps to reproduce are for outdated versions of Drupal.

So, tagging for updated steps to reproduce.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.