A vertex looked up by id costs up to three backend reads: its existence, its properties and its label
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- cassandra, java
- Ambito
- databases, distributed-systems, performance
Direzione di ricerca
Start with StandardJanusGraphTx.VertexConstructor to trace the existence check and the relation slices read for a vertex lookup. Then read CacheVertex.getSuperResultSet and SliceQuery.subsumes to understand how a broader cached result could serve later label and property queries. Check backend read counts for single- and multi-id lookups; done means the proposed bounded slice avoids redundant reads without loading unbounded property data for existence-only checks.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Looking a vertex up by its id (g.V(id), graph.vertices(ids), tx.getVertex(id)) reads its row from the storage backend up to three times, each a round trip on a remote backend such as Cassandra:
StandardJanusGraphTx.VertexConstructorreads the slice of theVertexExistssystem property to tell whether the vertex exists (every transaction verifies the existence of vertices looked up by id unlesscheckExternalVertexExistence(false)is set, asstorage.batch-loadingdoes).- The first access to one of its properties reads all of its properties (
query.fast-property, on by default): a second slice of the same row. - The first access to its label reads the
vertexlabelsystem edge: a third slice.
So g.V(id).values('name') costs two round trips, and anything which reads the label too, such as serializing the vertex for a client, g.V(id).elementMap() or g.V(id).valueMap(true), three. g.V(id1, id2, …) reads the existence of all the ids in one multi-key read, then the properties and the labels of each vertex (one more multi-key read each with query.batch, one read per vertex without).
The three slices are adjacent in the row. The column prefix of a relation (IDHandler.DirectionID.getPrefix) sorts system properties first, then system edges, then user properties, then user edges, so one slice from the first system relation to the end of the user properties holds the existence marker, which is the first cell of every vertex (system property, type id 1), the label edge and every property, and nothing else; the system relations alone hold the marker and the label.
A traversal knows what it reads of a looked-up vertex next, so its lookup could read that along with the existence, in one of these slices bounded by a limit, and keep a complete result in the vertex's relation cache, whose superset lookup (CacheVertex.getSuperResultSet, SliceQuery.subsumes) then answers the step's query without a backend read: the label for label() or hasLabel(...), the label and all properties for valueMap(), elementMap() or a has(...) with query.fast-property. It must read nothing the traversal wouldn't read: g.V(id).out() reads no property, and a step which reads one property by key must not have all of them read, which would be expensive for wide vertices. Several ids looked up together can be read with one multi-key read where the next step reads all of them in one batch.
- 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
-
Every CQL read result is handed to the deserialization executor before the reader wakes, even a single small pageForse già presa @porunov l’ha presa 21 giorni fa. Apertakind/performance
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
JanusGraph/janusgraph#5010 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di JanusGraph/janusgraph
Issue simili
-
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
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
openremote/openremote#3487 · 1 commento ·
-
Type/Bug U2
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
wso2/product-is#28675 ·
I maintainer di solito rispondono entro 1 giorno
-
a:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
erupts/erupt#460 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno