Bug #59587

Epic #55070: Workpackages

Epic #55065: WP: Overall System Performance (Backend and Frontend)

Performance killer: APC cache backend, wrong assignment of cache tags

Added by Florian Schwaiger over 5 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Must have
Category:
Caching
Target version:
-
Start date:
2014-06-15
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

It adds way too many tags to the "ident_..." entries due to wrong usage of for loop. This results in ident-to-tag-mappings that are larger than the actual cache entries themselves.

Check the attached patch which solves the bug.
Please merge the fix soon so we can update our server.

apc-tags-patch.diff View (808 Bytes) Florian Schwaiger, 2014-06-15 17:58


Related issues

Related to TYPO3 Core - Bug #62513: Backport #59587 to TYPO3 4.5 Closed 2014-10-28

Associated revisions

Revision 3d930170 (diff)
Added by Alexander Opitz over 5 years ago

[BUGFIX] Too many tags by identifier in CacheBackends

This applies to Apc/Memcached/Wincache/Xcache backends.

After an array_merge the values aren't unique. This leads to duplicate
tags per identifier. This patch changes that and also moves the
findTagsByIdentifier call out of the foreach loop.

Resolves: #59587
Releases: 6.3, 6.2, 6.1
Change-Id: Id31e16fa4bba11038ba692a483fb9a33808d95fa
Reviewed-on: https://review.typo3.org/30767
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Markus Klein
Tested-by: Markus Klein

Revision 5a11bbe8 (diff)
Added by Alexander Opitz over 5 years ago

[BUGFIX] Too many tags by identifier in CacheBackends

This applies to Apc/Memcached/Wincache/Xcache backends.

After an array_merge the values aren't unique. This leads to duplicate
tags per identifier. This patch changes that and also moves the
findTagsByIdentifier call out of the foreach loop.

Resolves: #59587
Releases: 6.3, 6.2, 6.1
Change-Id: Id31e16fa4bba11038ba692a483fb9a33808d95fa
Reviewed-on: https://review.typo3.org/31518
Reviewed-by: Markus Klein
Tested-by: Markus Klein

Revision 072f3555 (diff)
Added by Alexander Opitz over 5 years ago

[BUGFIX] Too many tags by identifier in CacheBackends

This applies to Apc/Memcached/Wincache/Xcache backends.

After an array_merge the values aren't unique. This leads to duplicate
tags per identifier. This patch changes that and also moves the
findTagsByIdentifier call out of the foreach loop.

Resolves: #59587
Releases: 6.3, 6.2, 6.1
Change-Id: Id31e16fa4bba11038ba692a483fb9a33808d95fa
Reviewed-on: https://review.typo3.org/31519
Reviewed-by: Markus Klein
Tested-by: Markus Klein

Revision 3cbad6cd (diff)
Added by Markus Klein over 5 years ago

[BUGFIX] Followup to CacheBackend patch

Re-add a missing use statement that vanished during rebase.

Resolves: #59587
Releases: 6.3, 6.2, 6.1
Change-Id: I16ac1b9d5a00c4300202eaef493de43fc988a81d
Reviewed-on: https://review.typo3.org/31520
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters

Revision 11fc31e1 (diff)
Added by Markus Klein over 5 years ago

[BUGFIX] Followup to CacheBackend patch

Re-add a missing use statement that vanished during rebase.

Resolves: #59587
Releases: 6.3, 6.2, 6.1
Change-Id: I16ac1b9d5a00c4300202eaef493de43fc988a81d
Reviewed-on: https://review.typo3.org/31521
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters

Revision 66d2354a (diff)
Added by Markus Klein over 5 years ago

[BUGFIX] Followup to CacheBackend patch

Re-add a missing use statement that vanished during rebase.

Resolves: #59587
Releases: 6.3, 6.2, 6.1
Change-Id: I16ac1b9d5a00c4300202eaef493de43fc988a81d
Reviewed-on: https://review.typo3.org/31522
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters

History

#1 Updated by Alexander Opitz over 5 years ago

  • Status changed from New to Accepted
  • Assignee set to Alexander Opitz
  • Complexity changed from no-brainer to easy

By reading the code, this solution seams not correct course the source around also isn't correct, a copy&paste error IMHO.

One line above:

if (array_search($entryIdentifier, $existingTags) === FALSE) {

Why do we search the identifier in the existingTags? This should fail every time.

And again one line upper:

$existingTags = $this->findTagsByIdentifier($entryIdentifier);

Why should we search for all tags in every loop? We know them after first access.

#2 Updated by Gerrit Code Review over 5 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30767

#3 Updated by Alexander Opitz over 5 years ago

  • Status changed from Under Review to Accepted
  • Parent task set to #55065

#4 Updated by Alexander Opitz over 5 years ago

This issue also applies to Memcached/Wincache/Xcache

#5 Updated by Gerrit Code Review over 5 years ago

  • Status changed from Accepted to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30767

#6 Updated by Gerrit Code Review over 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30767

#7 Updated by Gerrit Code Review over 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30767

#8 Updated by Gerrit Code Review over 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30767

#9 Updated by Gerrit Code Review over 5 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30767

#10 Updated by Gerrit Code Review over 5 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30767

#11 Updated by Gerrit Code Review over 5 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30767

#12 Updated by Gerrit Code Review over 5 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30767

#13 Updated by Gerrit Code Review over 5 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30767

#14 Updated by Oliver Hader over 5 years ago

  • Complexity changed from easy to medium

#15 Updated by Gerrit Code Review over 5 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30767

#16 Updated by Gerrit Code Review over 5 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30767

#17 Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31518

#18 Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31519

#19 Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31518

#20 Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31520

#21 Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31521

#22 Updated by Gerrit Code Review over 5 years ago

Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31522

#23 Updated by Markus Klein over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#24 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF