Skip to content

Commit

Permalink
[BUG] Rename memberlist to match new memberlist name (#1910)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- We renamed the memberlist to query-service-memberlist given the
query/compactor split.
	 - This aligns all the defaults with that name
 - New functionality
	 - None

## Test plan
*How are these changes tested?*
- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
None
  • Loading branch information
HammadB authored Mar 21, 2024
1 parent f5e173d commit 81375e8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
6 changes: 3 additions & 3 deletions chromadb/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class Settings(BaseSettings): # type: ignore
chroma_collection_assignment_policy_impl: str = (
"chromadb.ingest.impl.simple_policy.SimpleAssignmentPolicy"
)
worker_memberlist_name: str = "worker-memberlist"
worker_memberlist_name: str = "query-service-memberlist"
chroma_coordinator_host = "localhost"

chroma_logservice_host = "localhost"
Expand Down Expand Up @@ -331,11 +331,11 @@ def __init__(self, settings: Settings):
and settings["chroma_segment_cache_policy"] != "LRU"
):
logger.error(
f"Failed to set chroma_segment_cache_policy: Only LRU is available."
"Failed to set chroma_segment_cache_policy: Only LRU is available."
)
if settings["chroma_memory_limit_bytes"] == 0:
logger.error(
f"Failed to set chroma_segment_cache_policy: chroma_memory_limit_bytes is require."
"Failed to set chroma_segment_cache_policy: chroma_memory_limit_bytes is require."
)

# Apply the nofile limit if set
Expand Down
9 changes: 2 additions & 7 deletions chromadb/segment/impl/distributed/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@
import chromadb.proto.chroma_pb2 as proto
import grpc
from concurrent import futures
from chromadb.proto.convert import (
to_proto_vector_embedding_record
)
from chromadb.segment import SegmentImplementation, SegmentType
from chromadb.telemetry.opentelemetry import (
OpenTelemetryClient
)
from chromadb.telemetry.opentelemetry import OpenTelemetryClient
from chromadb.types import EmbeddingRecord
from chromadb.segment.distributed import MemberlistProvider, Memberlist
from chromadb.utils.rendezvous_hash import assign, murmur3hasher
Expand Down Expand Up @@ -54,7 +49,7 @@ def __init__(self, system: System) -> None:
self._opentelemetry_client = system.require(OpenTelemetryClient)
# TODO: add term and epoch to segment server
self._memberlist_provider = system.require(MemberlistProvider)
self._memberlist_provider.set_memberlist_name("worker-memberlist")
self._memberlist_provider.set_memberlist_name("query-service-memberlist")
self._assignment_policy = system.require(CollectionAssignmentPolicy)
self._create_pulsar_topics()
self._consumer = system.require(Consumer)
Expand Down
7 changes: 4 additions & 3 deletions go/cmd/coordinator/cmd.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package main

import (
"github.com/chroma-core/chroma/go/pkg/coordinator/grpc"
"github.com/chroma-core/chroma/go/pkg/grpcutils"
"io"
"time"

"github.com/chroma-core/chroma/go/pkg/coordinator/grpc"
"github.com/chroma-core/chroma/go/pkg/grpcutils"

"github.com/chroma-core/chroma/go/cmd/flag"
"github.com/chroma-core/chroma/go/pkg/utils"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -53,7 +54,7 @@ func init() {

// Memberlist
Cmd.Flags().StringVar(&conf.KubernetesNamespace, "kubernetes-namespace", "chroma", "Kubernetes namespace")
Cmd.Flags().StringVar(&conf.WorkerMemberlistName, "worker-memberlist-name", "worker-memberlist", "Worker memberlist name")
Cmd.Flags().StringVar(&conf.WorkerMemberlistName, "worker-memberlist-name", "query-service-memberlist", "Worker memberlist name")
Cmd.Flags().StringVar(&conf.AssignmentPolicy, "assignment-policy", "rendezvous", "Assignment policy")
Cmd.Flags().DurationVar(&conf.WatchInterval, "watch-interval", 60*time.Second, "Watch interval")
}
Expand Down
2 changes: 1 addition & 1 deletion rust/worker/chroma_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ worker:
hasher: Murmur3
memberlist_provider:
CustomResource:
memberlist_name: "worker-memberlist"
memberlist_name: "query-service-memberlist"
queue_size: 100
ingest:
queue_size: 10000
Expand Down
2 changes: 1 addition & 1 deletion rust/worker/src/memberlist/memberlist_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ mod tests {
let kube_ns = "chroma".to_string();
let kube_client = Client::try_default().await.unwrap();
let memberlist_provider = CustomResourceMemberlistProvider::new(
"worker-memberlist".to_string(),
"query-service-memberlist".to_string(),
kube_client.clone(),
kube_ns.clone(),
10,
Expand Down

0 comments on commit 81375e8

Please sign in to comment.