HBase backend: edges cannot be persisted and vertex ID mismatch
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Área
- databases
Línea de trabajo
Comienza reproduciendo el problema mediante el backend de HBase, usando los endpoints REST de vertex y edge y los puntos de entrada de Gremlin addE, g.V() y g.E() descritos aquí. Traza el manejo de los IDs de vertex y las rutas de persistencia de edges; después, verifica que los IDs devueltos permitan realizar búsquedas y crear edges, que los edges sobrevivan a las recargas, que los IDs sean únicos entre labels y que los recuentos de edges coincidan con los edges almacenados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Issue Draft: HBase Backend - Edges Cannot Be Persisted
Environment
- HugeGraph: 1.7.0 (server), pyhugegraph: 1.7.0 (client)
- HBase: 2.1.2
- ID Strategy:
PRIMARY_KEY - Serializer:
binary
Description
When HugeGraph uses HBase as the backend storage, edges cannot be persisted regardless of the creation method used (REST API or Gremlin). Vertex creation works, but all edge creation approaches either fail explicitly or silently discard the data.
Reproduction Steps
Schema Setup
// Property keys
schema.propertyKey('name').asText().ifNotExist().create()
schema.propertyKey('date').asText().ifNotExist().create()
// Vertex label with PRIMARY_KEY strategy
schema.vertexLabel('person').properties('name').usePrimaryKeyId().primaryKeys('name').ifNotExist().create()
// Edge label
schema.edgeLabel('roommate').sourceLabel('person').targetLabel('person').properties('date').nullableKeys('date').ifNotExist().create()
Create Vertices
// REST API - works fine
POST /graphs/{graph}/graph/vertices
{"label": "person", "properties": {"name": "Alice"}}
{"label": "person", "properties": {"name": "Bob"}}
Response IDs: "1:Alice", "1:Bob" (composite format from PRIMARY_KEY strategy).
Attempt Edge Creation
Method 1: REST API with returned composite IDs — fails with error
POST /graphs/{graph}/graph/edges
{"label": "roommate", "outV": "1:Alice", "inV": "1:Bob", "properties": {"date": "2024"}}
→ 400 Bad Request: IllegalArgumentException: Invalid vertex id '1:Alice'
Method 2: REST API with actual stored IDs (from g.V().id()) — also fails
g.V().id() returns integers (e.g., 9988829793) instead of the composite IDs returned by addVertex. Using these:
POST /graphs/{graph}/graph/edges
{"label": "roommate", "outV": 9988829793, "inV": 9837833573, "properties": {"date": "2024"}}
→ 400 Bad Request: IllegalArgumentException: Invalid vertex id '9988829793'
Note: The vertex CAN be retrieved via REST API GET /vertices/9988829793 (returns 200), but edge creation rejects the same ID.
Method 3: Gremlin addE — appears to succeed but data is not persisted
g.V().hasLabel('person').has('name','Alice').addE('roommate').to(__.V().hasLabel('person').has('name','Bob')).property('date','2024')
Response: Returns the edge object with ID and properties (appears successful).
Verification:
g.E().count() → returns stale/incorrect count (e.g., 3)
g.E().toList() → returns [] (empty, correct)
GET /graph/edges → {"edges": []} (empty)
The edge is created in memory but not persisted to HBase.
Additional Observations
1. Vertex ID Mismatch
With PRIMARY_KEY strategy and HBase backend:
addVertexREST API returns composite IDs:"1:Alice"g.V().id()returns auto-generated integers:9988829793g.V().valueMap(true)returns the integer ID- The vertex is accessible via
GET /vertices/{integer_id}but NOT viaGET /vertices/1:Alice g.V({integer_id})lookup also returns empty (cannot find vertex by its own ID)
2. Vertex ID Collision Across Labels
Different vertex labels with different primary key values may share the same internal ID:
person:James (pk="James") → stored as 9837833573
webpage:James的个人网站 (pk="James的个人网站") → also stored as 9837833573
This suggests the HBase backend generates IDs based on a hash that ignores the vertex label, causing cross-label collisions.
3. g.E().count() Returns Incorrect Results
After Gremlin addE calls that don't persist:
g.E().count()may return a non-zero stale countg.E().toList()returns empty (correct)- REST API
/edgesreturns empty (correct)
Expected Behavior
- Edge creation via REST API should find vertices by the IDs returned by
addVertex - Edge creation via Gremlin
addEshould persist edges to the backend g.V().id()should return IDs that can be used for subsequent lookups and edge creation- Vertex IDs should be unique across different vertex labels
Actual Behavior
- No method of edge creation works with HBase backend
- Vertex IDs are inconsistent between
addVertexresponse andg.V().id() - Vertex IDs collide across labels
g.E().count()returns stale/incorrect counts
- Lenguaje dominante
- Java
- Estrellas
- 3.2k
- Forks
- 640
- Merge medio
- 3 d 9 h
- PR fusionados (30 d)
- 22
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/hugegraph
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
apache/hugegraph#3231 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
apache/hugegraph#3142 · 7 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Feature] Apache Ranger Authorization Plugin for HugeGraphPosiblemente ocupada @vaijosh la tomó hace 1 día. Abiertofeature
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
[Bug] HStore Server image (`hugegraph/server`) keeps crash diagnostics only inside the container, so a restart on Kubernetes loses themPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 1 día
-
[Bug] Store IpUtil.getNearestAddress logs ERROR for hostname addresses and can return 127.0.0.1Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de apache/hugegraph
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
jenkinsci/gitlab-plugin#1950 ·
-
It's not necessary to copy the memory block in the readWrite() of org.h2.store.fs.mem.FileMemDataAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
h2database/h2database#4435 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
micronaut-projects/micronaut-core#13717 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ADORSYS-GIS/token-status-link#145 ·
Los mantenedores suelen responder en 3 días
-
enhancement
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
helidon-io/helidon#12721 ·
Los mantenedores suelen responder en 1 día