Concurrent batches into an auto-schema-created collection lose objects

Open Beginner friendly
#635 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
62/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
documentation

Research direction

Start with the client README and find the section covering imports or batching. Document the reported workaround: create the collection before importing, or send the first object separately before concurrent batches. The issue is done when the README explains the workaround and the race it addresses.

Written by the indexing model from the issue text.

Description

Problem

When several batches write concurrently into a collection that auto-schema has to create, they race to create it. The server rejects the losers' objects with:

auto-schema: create collection: class name ... already exists

In 4 of 5 runs, 2–4 of 40 objects were lost (Weaviate 1.39.7, server-side batching). Concurrent insertMany calls hit the same race, so this looks like a server-side issue rather than a client one.

Workaround

Create the collection before importing, or send the first object on its own before starting concurrent batches.

Suggestion

Document the workaround in the client README, and track the race in the core repo if it isn't tracked already.

Dominant language
Java
Stars
34
Forks
31
Avg merge
2d 10h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from weaviate/java-client

All issues in weaviate/java-client

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.