Add document fails if the collection is queried on another request
I have chroma installed as a service and have two clients connected to the DB, one adding documents to a collection and the other one as a UI to search documents.
If I query the collection while adding documents to it, the "add" call fails with:
Exception: {"error":"RuntimeError('Cannot resize, max element is less than the current number of elements')"}
To reproduce, write two apps that connect to chroma via REST:
- app that loops through documents and calls
collection.add. - app that queries the same collection with
collection.query
App 1 will fail with the above error.
Hi, What version of chroma are you on? There was a bug with the resizing logic in <0.3.18 that may be causing this.
Ok, I was on 0.3.12. The release rate here is high :).
Updated everything but now after restarting the chroma server it doesn´t list the imported collections. Trying to figure out why it's not loading, as the files seems to be at .chroma/index.
@nicolasf closing this for now (stale), but let us know if it would be helpful to re-open if there are other issues you are running into.