Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the thread safety issue in InMemoryEmbeddingStore. #351

Merged
merged 2 commits into from Dec 14, 2023

Conversation

lexluo09
Copy link
Contributor

@lexluo09 lexluo09 commented Dec 13, 2023

fix the thread safety issue in InMemoryEmbeddingStore.

Log and Stack trace:

java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:911)
at java.util.ArrayList$Itr.next(ArrayList.java:861)
at dev.langchain4j.store.embedding.inmemory.InMemoryEmbeddingStore.findRelevant(InMemoryEmbeddingStore.java:122)
at dev.langchain4j.store.embedding.EmbeddingStore.findRelevant(EmbeddingStore.java:67)

#350

@lexluo09
Copy link
Contributor Author

@langchain4j Can you help take a look, please? Thank you.

Copy link
Owner

@langchain4j langchain4j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lexluo09 thank you!

@langchain4j langchain4j merged commit f1575a9 into langchain4j:main Dec 14, 2023
6 checks passed
langchain4j pushed a commit that referenced this pull request Dec 14, 2023
… sure it deserializes into thread safe list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants