We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7202f83 commit c53579cCopy full SHA for c53579c
chromadb/api/rust.py
@@ -75,12 +75,8 @@ def __init__(self, system: System):
75
max_file_handles = resource.getrlimit(resource.RLIMIT_NOFILE)[0]
76
else:
77
max_file_handles = ctypes.windll.msvcrt._getmaxstdio() # type: ignore
78
- self.hnsw_cache_size = (
79
- max_file_handles
80
- # This is integer division in Python 3, and not a comment.
81
- # Each HNSW index has 4 data files and 1 metadata file
82
- // 5
83
- )
+ # Calculate cache size with a minimum value of 1 to avoid segmentation fault
+ self.hnsw_cache_size = max(1, max_file_handles // 5)
84
85
@override
86
def start(self) -> None:
0 commit comments