v6: ConsistencyLevel QUORUM and ALL are sent over gRPC as CONSISTENCY_LEVEL_ONE

Aperta Adatta ai principianti
#628 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java

Direzione di ricerca

Leggi src/main/java/io/weaviate/client6/v1/api/collections/query/ConsistencyLevel.java, dove l’issue identifica le tre mappature dell’enum e gli overload di appendTo che le usano. Confronta i valori di consistenza gRPC con le mappature attese QUORUM e ALL, quindi verifica che le richieste di ricerca e scrittura trasportino questi valori.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

ConsistencyLevel.QUORUM and ConsistencyLevel.ALL are sent over gRPC as CONSISTENCY_LEVEL_ONE. All three enum constants carry the same proto value:

https://github.com/weaviate/java-client/blob/ff57caed14df5778ef715132d618383da559c1cc/src/main/java/io/weaviate/client6/v1/api/collections/query/ConsistencyLevel.java#L13-L24

ONE(WeaviateProtoBase.ConsistencyLevel.CONSISTENCY_LEVEL_ONE, "ONE"),
QUORUM(WeaviateProtoBase.ConsistencyLevel.CONSISTENCY_LEVEL_ONE, "QUORUM"),
ALL(WeaviateProtoBase.ConsistencyLevel.CONSISTENCY_LEVEL_ONE, "ALL");

The REST query parameter (the second argument) is right; only the gRPC value is wrong. The appendTo overloads use it for search, batch delete, batch objects and batch stream, so reads and writes that ask for QUORUM or ALL silently run at ONE. Nothing fails, so callers have no way to notice.

Reproduction (client 6.3.2, server 1.39.13)

A ClientInterceptor installed through Config.grpcChannelOptions(b -> b.intercept(...)) that logs each outgoing message shows:

collection.withConsistencyLevel(ConsistencyLevel.QUORUM).query.fetchObjects(q -> q.limit(1));
// sent: consistency_level: CONSISTENCY_LEVEL_ONE
collection.withConsistencyLevel(ConsistencyLevel.ALL).query.fetchObjects(q -> q.limit(1));
// sent: consistency_level: CONSISTENCY_LEVEL_ONE

Expected

QUORUM → CONSISTENCY_LEVEL_QUORUM, ALL → CONSISTENCY_LEVEL_ALL. Present on main at ff57cae.

Lingua principale
Java
Stelle
34
Fork
29
Merge medio
2g 10h
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di weaviate/java-client

Tutte le issue di weaviate/java-client

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.