Every CQL read result is handed to the deserialization executor before the reader wakes, even a single small page
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Java
- Stelle
- 5.9k
- Fork
- 1.2k
- Merge medio
- 2g 6h
- PR unite (30g)
- 77
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di JanusGraph/janusgraph
-
Add Janus Studio to the Visualization sectionForse già presa @Zorabi l’ha presa 66 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
JanusGraph/janusgraph#4943 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
JanusGraph/janusgraph#1578 ·
I maintainer di solito rispondono entro 2 giorni
-
kind/bug/possible
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
JanusGraph/janusgraph#5113 ·
I maintainer di solito rispondono entro 2 giorni
-
kind/bug/possible
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
JanusGraph/janusgraph#5051 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
A vertex looked up by id costs up to three backend reads: its existence, its properties and its labelForse già presa @porunov l’ha presa 21 giorni fa. Apertakind/performance
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
JanusGraph/janusgraph#5016 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di JanusGraph/janusgraph
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
linagora/twake-calendar-side-service#1218 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] [Go] Ack returns nil when the server answers with a non-OK statusForse già presa @leizhiyuan l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
apache/rocketmq-clients#1465 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
pdfium-drift
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Stirling-Tools/JPDFium#188 ·
I maintainer di solito rispondono entro 1 giorno