Skip to content

Commit

Permalink
update len check
Browse files Browse the repository at this point in the history
  • Loading branch information
HammadB committed Jan 15, 2025
1 parent 4d90d73 commit e30d0f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chromadb/segment/impl/distributed/segment_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ def get_segment_endpoint(self, segment: Segment) -> str:
# We want to route using the node name over the member id
# because the node may have a disk cache that we want a
# stable identifier for over deploys.
can_use_node_routing = all([m.node != "" for m in self._curr_memberlist])
can_use_node_routing = all(
[m.node != "" and len(m.node) != 0 for m in self._curr_memberlist]
)
if can_use_node_routing and self._routing_mode == RoutingMode.NODE:
# If we are using node routing and the segments
assignment = assign(
Expand Down

0 comments on commit e30d0f8

Please sign in to comment.