Reduce concurrent runs of WDK cache population
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
Start by tracing the WDK cache-population path described in the issue, including cache-table creation and updates to query_instance. Read the existing concurrency and race-condition protection first, then identify the request entry points for the same query hash. Done means duplicate in-flight searches no longer repeat unnecessarily while the existing cross-site guarantees remain; no files or tests are named.
索引モデルが issue の本文から書いたものです。
説明
Per Sept 9 scrum, we would like to reduce the number of times a particular application tried to concurrently fill a specific cache. If one search is taking too long, the user may try to reload the page or try the search again. This will take yet more resources (CPU + DB connection + network) for no benefit. A possible solution was worked out previously:
Background on WDK Cache Maintenance and a suggested solution (which we are not taking):
The way we combat WDK cache insertion race conditions is working; however, ever since we moved to a service + thick-client (vs JSP page) architecture, it has no longer been optimal. We should find a way to reduce concurrent query execution while still providing the guarantees the current system provides.
Review: right now what happens is that if a result needs to be put into a cache table, a new cache table name is procured (in an atomic way) and then the result is placed in that table. Once this is successful, a row is added/replaced in the query_instance table that maps query hashes to cache table names. Any request comes in that needs the same cached result (but the row in the query_instance table does not yet exist), performs the same logic concurrently, with the last cache table to complete "winning" and having its name associated with the query hash.
This worked quite well in the Servlet/JSP architecture because, e.g. the entire result page was rendered by a single request. The servlet for that page would fill the cache table, then any other code or JSP tag that needed the values would use them. The race condition only happened if the user asked for the same results page in two separate tabs, so actual concurrency was rare an inexpensive.
In our new architecture, different parts of the result page render in parallel (strategy panel, organism filter, counts display, result table, etc.), with requests made at the same time to fetch their data. If the result is not yet in the cache, this can kick off many queries performing the same search (and filling separate cache tables), only to have one of them be used in subsequent requests. This is inefficient; a single load could happen per query hash, where secondary requests wait for the query to complete. Our existing mechanism to protect against separate tabs or even separate sites configured with the same appDB+login could remain.
- 主要言語
- Java
- スター
- 1
- フォーク
- 4
- 平均マージ
- 24分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
VEuPathDB/WDK のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
Feature request: Add redirectUrl query parameter support to `/service/logout` endpoint対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンenhancement
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
-
Refine login API to get rid of cookies and automatic guests対応中かも @ryanrdoherty が 707 日前に担当しました。 オープン
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
a2aproject/a2a-java#1275 ·
メンテナーはふだん 1 日以内に返信
-
module/ftp Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ballerina-platform/ballerina-library#9476 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
anwilli5/coin-collection-android-US#515 ·
メンテナーはふだん 1 日以内に返信
-
status: waiting-for-triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
spring-projects/spring-integration#11654 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 70/100
Vakore/ZappierGames#248 ·