Circular SearchRanking associations make the Shopware 6.7.15 admin search run out of memory
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 70/100
Línea de trabajo
El ciclo proviene de las marcas ASSOCIATION_SEARCH_RANKING en blogAuthor y blogCategories en BlogEntryDefinition, y en las asociaciones inversas blogEntries en BlogAuthorDefinition y BlogCategoryDefinition. Empieza encontrando esas marcas y eliminando SearchRanking de las dos asociaciones blogEntries, como sugiere el issue. Se considera terminado cuando una búsqueda de términos en DAL sobre werkl_blog_entry deja de recursar y la búsqueda de entradas de blog por nombre de autor o categoría sigue devolviendo resultados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Circular SearchRanking associations make the Shopware 6.7.15 admin search run out of memory
OpenBlogware version: 5.3.3 · Shopware version: 6.7.15.1
Description
The blog entity definitions flag associations that point back to each other with SearchRanking:
BlogEntryDefinition:blogAuthorandblogCategories(ASSOCIATION_SEARCH_RANKING)BlogAuthorDefinition:blogEntries(ASSOCIATION_SEARCH_RANKING)BlogCategoryDefinition:blogEntries(ASSOCIATION_SEARCH_RANKING)
Shopware's EntityScoreQueryBuilder follows SearchRanking associations recursively without a cycle guard, so a DAL term search on werkl_blog_entry, werkl_blog_author or werkl_blog_category recurses forever.
Since Shopware 6.7.15 the administration global search falls back to the DAL term search for entities without an admin Elasticsearch indexer (shopware/shopware#19399). With admin Elasticsearch enabled, typing in the global search now exhausts PHP memory (EntityScoreQueryBuilder.php line 58) as soon as the blog entities are part of the search preferences, which they are by default.
Steps to reproduce
- Shopware 6.7.15.1 with
SHOPWARE_ADMIN_ES_ENABLED=1, OpenBlogware 5.3.3 installed. - Type any term in the administration global search, or
POST /api/_admin/es-searchwith{"term": "test", "entities": ["werkl_blog_entry"]}.
Suggested fix
Drop SearchRanking from the inverse blogEntries associations in BlogAuthorDefinition and BlogCategoryDefinition. Searching blog entries by author or category name still works through blogAuthor / blogCategories. The cycle is reported to Shopware core as well (shopware/shopware#21580).
- Lenguaje dominante
- PHP
- Estrellas
- 43
- Forks
- 21
- Merge medio
- 12 d 20 h
- PR fusionados (30 d)
- 1
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Werkstattl/OpenBlogware
-
Dificultad 3/5 1-2 días Aptitud para principiantes 28/100
Werkstattl/OpenBlogware#91 · 1 comentario ·
-
Auflistung im Element eingrenzenPosiblemente ocupada @7underlines la tomó hace 2 días. Abiertobug
Werkstattl/OpenBlogware#70 · 2 comentarios · 1 asignado ·
Todos los issues de Werkstattl/OpenBlogware
Issues similares
-
Dificultad 2/5 Medio día Aptitud para principiantes 68/100
components-web-app/docs#244 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nhrrob/nhrrob-secure#22 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
PrestaShopCorp/ps_eventbus#501 · 2 reacciones ·
-
category::task maintenance priority::normal
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
e0ipso/schema-forms-php#58 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Automattic/blocks-engine#2866 ·
Los mantenedores suelen responder en 1 día