Skip to content

v1.2.0 — embeddinggemma default + concurrency/timeout bug fixes#2

Merged
iksnerd merged 1 commit into
mainfrom
feat/v1.2.0-bug-fixes
May 1, 2026
Merged

v1.2.0 — embeddinggemma default + concurrency/timeout bug fixes#2
iksnerd merged 1 commit into
mainfrom
feat/v1.2.0-bug-fixes

Conversation

@iksnerd

@iksnerd iksnerd commented May 1, 2026

Copy link
Copy Markdown
Owner

Summary

1. Fix concurrency race in collection switch. mcp_server.ex handle_tool_call("reindex", ...) now pre-checks Indexer.busy?/0 before IndexManagement.ensure_collection_for_project/1. Previously a rejected reindex still swapped the active Qdrant collection, causing in-flight Broadway batches from the prior job to write to a non-existent collection.

2. Fix cold-start Ollama timeouts dropping chunks. embed_batch/1 retries up to 3× with linear backoff on transient errors. recv_timeout raised from 30s → 60s. EmbeddingModel.warm_up/0 runs from Application.start/2. All three knobs are Application env so tests fast-fail (1s/0 retries).

3. Default model switched to embeddinggemma:300m. @default_model in embedding_model.ex, plus .env.example, config.exs, CLAUDE.md, README.md, docs/DOCKERHUB.md. OLLAMA_MODEL=nomic-embed-text still works as override.

4. Version bump to 1.2.0.

Test plan

  • mix compile --warnings-as-errors passes
  • mix format --check-formatted passes
  • CI test job passes (verifying with this PR)
  • Manual: reindex(B) while reindex(A) is mid-flight now returns :indexing_in_progress without swapping the collection — verified by reproduction in the prior session
  • Manual: cold docker-compose up followed by reindex no longer drops chunks (warm-up + retries handle the first batches)

🤖 Generated with Claude Code

Fix concurrency race in collection switch:
mcp_server.ex handle_tool_call("reindex", ...) now pre-checks
Indexer.busy?/0 before calling IndexManagement.ensure_collection_for_project/1.
Previously, a rejected reindex would still swap the active Qdrant
collection out from under in-flight Broadway batches, producing
hundreds of "404 Not found: Collection nexus_X doesn't exist" errors
until container restart.

Fix cold-start Ollama timeouts dropping chunks:
embed_batch/1 retries up to 3 times with linear backoff on
:timeout / :connect_timeout / :econnrefused. Default recv_timeout
raised from 30s to 60s. Timeout, retry count and backoff are
configurable via Application env so tests can fast-fail.
EmbeddingModel.warm_up/0 runs from Application.start/2 so the
first real batch doesn't block on a cold model load.

Default model switched to embeddinggemma:300m:
@default_model in embedding_model.ex, plus updates in
docker-compose.yml (already in v1.1.x), .env.example, config.exs,
CLAUDE.md, README.md, docs/DOCKERHUB.md. OLLAMA_MODEL=nomic-embed-text
still works as override.

Bumps version to 1.2.0.
@iksnerd iksnerd merged commit 50bb128 into main May 1, 2026
1 of 2 checks passed
@iksnerd iksnerd deleted the feat/v1.2.0-bug-fixes branch May 1, 2026 18:36
iksnerd added a commit that referenced this pull request May 4, 2026
Fix concurrency race in collection switch:
mcp_server.ex handle_tool_call("reindex", ...) now pre-checks
Indexer.busy?/0 before calling IndexManagement.ensure_collection_for_project/1.
Previously, a rejected reindex would still swap the active Qdrant
collection out from under in-flight Broadway batches, producing
hundreds of "404 Not found: Collection nexus_X doesn't exist" errors
until container restart.

Fix cold-start Ollama timeouts dropping chunks:
embed_batch/1 retries up to 3 times with linear backoff on
:timeout / :connect_timeout / :econnrefused. Default recv_timeout
raised from 30s to 60s. Timeout, retry count and backoff are
configurable via Application env so tests can fast-fail.
EmbeddingModel.warm_up/0 runs from Application.start/2 so the
first real batch doesn't block on a cold model load.

Default model switched to embeddinggemma:300m:
@default_model in embedding_model.ex, plus updates in
docker-compose.yml (already in v1.1.x), .env.example, config.exs,
CLAUDE.md, README.md, docs/DOCKERHUB.md. OLLAMA_MODEL=nomic-embed-text
still works as override.

Bumps version to 1.2.0.

Co-authored-by: iksnerd <iksnerd@users.noreply.github.com>
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.

1 participant