The patch introduced in #1421844: views_fetch_data() cache item can reach over 10mb in size has a bug that produces a full cache rebuilds when you ask for an specific table cache data for which views cannot get any data.

In a current project this bug is causing that saving some big views takes +4 minutes.

I think it is safe to assume that if we didn't get cache data for a table at the first rebuild we are not going to get it in the next.

#1 1889198-views-cache-rebuild.patch612 bytesPedro Lozano
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


Pedro Lozano’s picture

Status: Active » Needs review
612 bytes
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es). View

This patch solves the problem and I think it doesn't cause any side effects.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

This is looking pretty good, and similiar to Drupal 8 :)

Pedro Lozano’s picture

andrewbelcher’s picture

I can confirm that this solved the problem. Attempting to clear caches was timing out for me, and even drush was taking more than 10 minutes just for a cc menu. With this patch it took seconds. This would be a really helpful patch to have committed!

dawehner’s picture

My question is: Why does something asks for a views table which does not exist?
One example could be a view in the system, for a table that does not exist, feel somehow wrong, but I agree we should fix that.

andrewbelcher’s picture

Our example was a module that had been disabled. But there were still views in the database built on an entity created by the disabled module...

It seems odd to be tracking $fully_loaded but not always respecting it...

Pedro Lozano’s picture

In my case, it was some old broken views that were using fields that no longer existed. For each broken field, two views data cache rebuilds were performed.

andypost’s picture

+1 to commit, in my case this was caused by broken view (used fields that was deleted)

dawehner’s picture

Status: Reviewed & tested by the community » Fixed

Awesome, thanks for providing a patch and testing it!

Committed and pushed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.