Circular SearchRanking associations make the Shopware 6.7.15 admin search run out of memory
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 70/100
調査の方向性
循環は、BlogEntryDefinition の blogAuthor と blogCategories にある ASSOCIATION_SEARCH_RANKING フラグと、BlogAuthorDefinition および BlogCategoryDefinition の逆方向の blogEntries 関連から生じています。まずこれらのフラグを見つけ、Issue の提案どおり 2 つの blogEntries 関連から SearchRanking を削除してください。werkl_blog_entry に対する DAL の用語検索が再帰しなくなり、著者名またはカテゴリ名でブログエントリを検索しても結果が返ることを確認すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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).
- 主要言語
- PHP
- スター
- 43
- フォーク
- 21
- 平均マージ
- 12日 20時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Werkstattl/OpenBlogware のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 28/100
Werkstattl/OpenBlogware#91 · コメント 1 件 ·
-
Auflistung im Element eingrenzen対応中かも @7underlines が 2 日前に担当しました。 オープンbug
Werkstattl/OpenBlogware#70 · コメント 2 件 · 担当者 1 名 ·
Werkstattl/OpenBlogware の issue をすべて見る
似ている issue
-
難易度 2/5 半日 初心者へのやさしさ 68/100
components-web-app/docs#244 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nhrrob/nhrrob-secure#22 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
PrestaShopCorp/ps_eventbus#501 · リアクション 2 件 ·
-
category::task maintenance priority::normal
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
e0ipso/schema-forms-php#58 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Automattic/blocks-engine#2866 ·
メンテナーはふだん 1 日以内に返信