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

Open Beginner friendly
#628 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java

Research direction

Read src/main/java/io/weaviate/client6/v1/api/collections/query/ConsistencyLevel.java, where the issue identifies the three enum mappings and the appendTo overloads that use them. Check the gRPC consistency values against the expected QUORUM and ALL mappings, then verify that search and write requests carry those values.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Java
Stars
34
Forks
29
Avg merge
2d 10h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from weaviate/java-client

All issues in weaviate/java-client

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.