Every CQL read result is handed to the deserialization executor before the reader wakes, even a single small page
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
調査の方向性
Start with AsyncCQLFunction.acceptDataChunk, StaticArrayEntryList.supplyEntryList, and CQLKeyColumnValueStore.getSlice to trace how pages are deserialized and how the reader's future is completed. Check how prepared statements and result column names are handled. Done means small single-page results can be deserialized on the I/O thread with exact-sized arrays, while large or multi-page results still use the executor; column indexes are resolved once per prepared statement. Linked pull request 5011 is already open.
索引モデルが issue の本文から書いたものです。
説明
Every read of the CQL backend hands its result from the driver's I/O thread to the executor service of storage.cql.executor-service.*, where it is deserialized, before the reader waiting for it is woken, however small the result is.
AsyncCQLFunction.acceptDataChunk runs on the driver's I/O thread when a page of a result arrives. For every page, the first and only one included, it queues the page in a ChunkedJobDefinition and calls StaticArrayEntryList.supplyEntryList, which submits a task to the executor service; that task turns the rows into an EntryList and completes the future the reader blocks on in CQLKeyColumnValueStore.getSlice. A read therefore wakes two threads, the executor's and the reader's, where one would do, and allocates a ChunkedJobDefinition (a ConcurrentLinkedQueue, a ReentrantLock and a CompletableFuture) per query. An empty result goes through the same hand-off to complete with EMPTY_LIST. The executor service exists so that the I/O threads, which decode every response of a node, aren't held up by deserializing large results; for the small results of most OLTP reads, a vertex's properties or a short adjacency list, the hand-off costs more than the work it moves.
The deserialization itself reads each row's cells by the names of their columns (row.getByteBuffer("column1"), which the driver resolves with a case-insensitive lookup per call), wraps them in a Tuple3 and two StaticArrayBuffers per row, and grows its arrays by doubling, copying as it goes, before a final trim copy, although the number of rows of a page and the size of its cells are known.
A result which is one page of few rows can be turned into entries on the I/O thread, with one copy into arrays of the exact size, and complete the reader's future directly; larger results and results of several pages should keep going to the executor service. The rows of every result can be read by the index of their columns, resolved once from the first result of each prepared statement.
- 主要言語
- Java
- スター
- 5.9k
- フォーク
- 1.2k
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 77
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JanusGraph/janusgraph のほかの issue
-
Add Janus Studio to the Visualization section対応中かも @Zorabi が 66 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
JanusGraph/janusgraph#4943 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
JanusGraph/janusgraph#1578 ·
メンテナーはふだん 2 日以内に返信
-
kind/bug/possible
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
JanusGraph/janusgraph#5113 ·
メンテナーはふだん 2 日以内に返信
-
kind/bug/possible
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
JanusGraph/janusgraph#5051 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
A vertex looked up by id costs up to three backend reads: its existence, its properties and its label対応中かも @porunov が 21 日前に担当しました。 オープンkind/performance
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
JanusGraph/janusgraph#5016 ·
メンテナーはふだん 2 日以内に返信
JanusGraph/janusgraph の issue をすべて見る
似ている issue
-
[BUG] jackson3 JacksonJsonpMapper(ObjectMapper) fails to deserialize `_source` with "Trailing token" error対応中かも @junyeokk が今日担当しました。 オープンbug untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
opensearch-project/opensearch-java#2236 ·
メンテナーはふだん 1 日以内に返信
-
Posting fails with "Context too long"対応中かも @jimklimov が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
open-learning-exchange/myplanet#18392 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
linagora/twake-calendar-side-service#1218 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信