brainy/src
David Snelling daf33b9e9b fix(metadata-index): fix rebuild stalling after first batch on FileSystemStorage
- Critical Fix: v4.2.2 rebuild stalled after processing first batch (500/1,157 entities)
- Root Cause: getAllShardedFiles() was called on EVERY batch, re-reading all 256 shard directories each time
- Performance Impact: Second batch call to getAllShardedFiles() took 3+ minutes, appearing to hang
- Solution: Load all entities at once for local storage (FileSystem/Memory/OPFS)
  - FileSystem/Memory/OPFS: Load all nouns/verbs in single batch (no pagination overhead)
  - Cloud (GCS/S3/R2): Keep conservative pagination (25 items/batch for socket safety)
- Benefits:
  - FileSystem: 1,157 entities load in 2-3 seconds (one getAllShardedFiles() call)
  - Cloud: Unchanged behavior (still uses safe batching)
  - Zero config: Auto-detects storage type via constructor.name
- Technical Details:
  - Pagination was designed for cloud storage socket exhaustion
  - FileSystem doesn't need pagination - can handle loading thousands of entities at once
  - Eliminates repeated directory scans: 3 batches × 256 dirs → 1 batch × 256 dirs
- Workshop Team: This resolves the v4.2.2 stalling issue - rebuild will now complete in seconds

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 09:19:17 -07:00
..
api feat(v4.0.0): Complete metadata/vector separation architecture with Azure support 2025-10-17 12:29:27 -07:00
augmentations feat(v4.0.0): Complete metadata/vector separation architecture with Azure support 2025-10-17 12:29:27 -07:00
cli chore(release): 4.0.0 2025-10-17 14:48:34 -07:00
config fix: enable GCS native storage with Application Default Credentials 2025-10-09 10:39:54 -07:00
cortex feat: add node: protocol to all Node.js built-in imports for bundler compatibility 2025-09-17 14:20:21 -07:00
critical feat: add browser environment compatibility support 2025-09-17 15:48:02 -07:00
data feat: Phase 3 - Unified Semantic Type Inference (Nouns + Verbs) 2025-10-16 10:59:26 -07:00
distributed feat(v4.0.0): Complete metadata/vector separation architecture with Azure support 2025-10-17 12:29:27 -07:00
embeddings feat(v4.0.0): Complete metadata/vector separation architecture with Azure support 2025-10-17 12:29:27 -07:00
errors feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
graph feat(v4.0.0): Complete metadata/vector separation architecture with Azure support 2025-10-17 12:29:27 -07:00
hnsw feat(v4.0.0): Complete metadata/vector separation architecture with Azure support 2025-10-17 12:29:27 -07:00
import feat: implement progressive flush intervals for streaming imports 2025-10-22 17:36:27 -07:00
importers feat: implement progressive flush intervals for streaming imports 2025-10-22 17:36:27 -07:00
interfaces feat: implement always-adaptive caching with getCacheStats monitoring 2025-10-10 14:09:30 -07:00
mcp refactor: streamline core API surface 2025-10-04 08:52:06 -07:00
neural feat: implement progressive flush intervals for streaming imports 2025-10-22 17:36:27 -07:00
patterns 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
query feat: Phase 3 - Unified Semantic Type Inference (Nouns + Verbs) 2025-10-16 10:59:26 -07:00
scripts feat: add node: protocol to all Node.js built-in imports for bundler compatibility 2025-09-17 14:20:21 -07:00
shared refactor: remove deprecated BrainyData class completely 2025-09-30 16:04:00 -07:00
storage perf: make getRelations() pagination consistent and efficient 2025-10-21 13:28:38 -07:00
streaming feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
triple feat: Phase 3 - Unified Semantic Type Inference (Nouns + Verbs) 2025-10-16 10:59:26 -07:00
types feat: implement progressive flush intervals for streaming imports 2025-10-22 17:36:27 -07:00
universal fix: prevent fs adapter from throwing on import in browser 2025-09-17 16:22:02 -07:00
utils fix(metadata-index): fix rebuild stalling after first batch on FileSystemStorage 2025-10-23 09:19:17 -07:00
vfs feat: add resolvePathToId() method and fix test issues 2025-10-07 11:51:17 -07:00
augmentationManager.ts feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
augmentationPipeline.ts feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
brainy.ts feat: add import API validation and v4.x migration guide 2025-10-21 15:25:12 -07:00
coreTypes.ts chore(release): 4.0.0 2025-10-17 14:48:34 -07:00
cortex.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
index.ts feat: Phase 3 - Unified Semantic Type Inference (Nouns + Verbs) 2025-10-16 10:59:26 -07:00
pipeline.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
setup.ts chore: enforce consistent coding style and semicolon removal 2025-09-29 09:50:59 -07:00
unified.ts chore: enforce consistent coding style and semicolon removal 2025-09-29 09:50:59 -07:00
worker.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00