Vector index lag
Diagnose and recover when new or edited books do not appear in text search.
Trigger / Symptom & Blast Radius
Newly created, edited, or deleted books appear in direct lookups and structured browse, but are missing or outdated in free-text search. Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs is an internal background worker triggered every 5 minutes by Scheduler ServiceServicev1.0.0Scheduler ServiceSingle-host Quartz.NET job execution engine and operational dashboard UI for scheduling recurring platform jobs and insp...PublishesProcessVectorBatchIntegrationEventAPIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs over Process Vector Batch ChannelChannelv1.0.0Process Vector Batch ChannelUnprefixed Kafka trigger topic owned by the platform team used by Scheduler Service every five minutes to initiate Catal...Ownerai-capabilities-teamOpen docs to sync up to 200 queued rows per batch from Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs into Catalog VectorContainerv1.0.0Catalog VectorNon-authoritative Qdrant vector search index owned by the Catalog bounded context for hybrid semantic and keyword book d...Ownercatalog-experience-teamDiagramOpen docs. Blast radius is limited to free-text search discovery; checkout and authoritative catalog browsing remain unaffected.
Run a full index rebuild only after confirmed vector store data loss or an indexed-field schema change. Never manually delete pending queue rows from Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs to hide a backlog.
Pre-Flight Check
Verify Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs container health and check pending queue depth in Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs:
az containerapp show --name <SERVICE_NAME> --resource-group <RESOURCE_GROUP> --query "properties.runningStatus" -o tsvSELECT count(*) AS pending_books, min(updated_at) AS oldest_pending_update, clock_timestamp() - min(updated_at) AS oldest_pending_ageFROM pending_vector_updates;Quick Recovery Procedure
Verify Scheduler and Kafka delivery
Open Quartz Dashboard at
/quartz(requiresadminrole) and confirm the 5-minute vector batch job is firing without errors, then inspect consumer lag on Process Vector Batch ChannelChannelv1.0.0Process Vector Batch ChannelUnprefixed Kafka trigger topic owned by the platform team used by Scheduler Service every five minutes to initiate Catal...Ownerai-capabilities-teamOpen docs:Terminal window az containerapp logs show --name <SERVICE_NAME> --resource-group <RESOURCE_GROUP> --tail 100If running locally in Aspire, ensure the Scheduler ServiceServicev1.0.0Scheduler ServiceSingle-host Quartz.NET job execution engine and operational dashboard UI for scheduling recurring platform jobs and insp...PublishesProcessVectorBatchIntegrationEventAPIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs resource is started manually in the Aspire Dashboard.
Check for a stuck PostgreSQL advisory lock
If Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs logs show skipped runs (
0processed items), check whether an orphaned session holds the ingestion advisory lock (740031001) in Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs:SELECT l.pid, a.usename, a.application_name, a.state, a.query_startFROM pg_locks lJOIN pg_stat_activity a ON a.pid = l.pidWHERE l.locktype = 'advisory' AND l.objid = 740031001;Terminate only a verified dead or hung session:
SELECT pg_terminate_backend(<STUCK_PID>);Verify embedding provider and vector store health
Check Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs logs for Microsoft Foundry embedding errors or Catalog VectorContainerv1.0.0Catalog VectorNon-authoritative Qdrant vector search index owned by the Catalog bounded context for hybrid semantic and keyword book d...Ownercatalog-experience-teamDiagramOpen docs connection timeouts. Unacknowledged rows remain safely queued in Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs and retry automatically on the next 5-minute cycle.
Drain backlog or trigger approved full rebuild
Once dependencies are healthy, trigger the vector batch job in Quartz Dashboard to drain a large backlog faster. Only if Catalog VectorContainerv1.0.0Catalog VectorNon-authoritative Qdrant vector search index owned by the Catalog bounded context for hybrid semantic and keyword book d...Ownercatalog-experience-teamDiagramOpen docs suffered data loss, re-enqueue all books:
INSERT INTO pending_vector_updates (book_id)SELECT id FROM booksON CONFLICT (book_id) DO UPDATE SET revision = gen_random_uuid(), updated_at = clock_timestamp();
Verification
Re-run the pending queue query in Catalog DatabaseContainerv1.0.0Catalog DatabaseAuthoritative PostgreSQL system of record owned by the Catalog bounded context for books, authors, categories, publisher...Ownercatalog-experience-teamDiagramOpen docs and confirm pending_books trends to 0:
SELECT count(*) AS pending_books FROM pending_vector_updates;Expected output:
pending_books--------------- 0Rollback / Escalation
- Rollback: If a full rebuild saturates embedding quotas, pause the trigger in Quartz Dashboard (
/quartz) until quota recovers, then resume. - Escalation: Escalate persistent embedding, vector store, or ingestion failures to Platform Engineering TeamTeamPlatform Engineering TeamPlatform team providing BookWorm's thinnest viable platform—orchestration, messaging fabric, scheduling, notifications, ...Open docs or Catalog Experience TeamTeamCatalog Experience TeamStream-Aligned team owning BookWorm's product catalog, customer reviews, and storefront/backoffice discovery experience....Open docs with queue age and sanitized logs.
| Symptom | Cause | Fix |
|---|---|---|
pending_books is 0 but search is stale | Search result is cached in Catalog CacheContainerv1.0.0Catalog CacheNon-authoritative FusionCache and Redis caching layer owned by the Catalog bounded context for fast book detail lookups ...Ownercatalog-experience-teamDiagramOpen docs | Wait for cache expiry or follow the stale cache runbook |
| Jobs never fire locally | Scheduler ServiceServicev1.0.0Scheduler ServiceSingle-host Quartz.NET job execution engine and operational dashboard UI for scheduling recurring platform jobs and insp...PublishesProcessVectorBatchIntegrationEventAPIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs requires explicit start in Aspire | Start Scheduler ServiceServicev1.0.0Scheduler ServiceSingle-host Quartz.NET job execution engine and operational dashboard UI for scheduling recurring platform jobs and insp...PublishesProcessVectorBatchIntegrationEventAPIsAsyncAPIOwnerplatform-engineering-teamDiagramRepositoryOpen docs in the Aspire Dashboard |
| Batch aborts with incomplete embeddings | Microsoft Foundry rate limit or auth failure | Verify Managed Identity RBAC and Foundry quota |
Related documentation
- Product IngestionFlowv1.0.0Product IngestionCatalog API persists product changes in PostgreSQL; Scheduler triggers Catalog Ingestion over Kafka every five minutes t...Ownercatalog-experience-teamView flowOpen docs — End-to-end vector indexing pipeline.
- ADR-003: Maintain the vector index asynchronously through a database-backed queueDecision Recordv1.0.0ADR-003: Maintain the vector index asynchronously through a database-backed queueDatabase triggers enqueue changed books, and Catalog Ingestion drains the queue in batches to update Qdrant, decoupling ...Ownercatalog-experience-teamOpen docs — Why Catalog uses a transactional database queue.