chroma icon indicating copy to clipboard operation
chroma copied to clipboard

Add document fails if the collection is queried on another request

Open nicolasf opened this issue 2 years ago • 2 comments

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:

  1. app that loops through documents and calls collection.add.
  2. app that queries the same collection with collection.query

App 1 will fail with the above error.

nicolasf avatar Mar 31 '23 14:03 nicolasf

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.

HammadB avatar Mar 31 '23 22:03 HammadB

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 avatar Apr 02 '23 16:04 nicolasf

@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.

jeffchuber avatar Jun 23 '23 16:06 jeffchuber