brainy/src
David Snelling d8ae76ba99 feat(storage): fix critical socket exhaustion during metadata reading
CRITICAL ISSUE FIXED: Service initialization was failing due to socket exhaustion
when reading metadata for 1400+ items during index rebuild

Changes:
- Add batch metadata reading to prevent 2000+ concurrent requests
- Implement strict concurrency control (3 max concurrent requests)
- Add proper yielding between batches to prevent event loop blocking
- Reduce batch sizes during initialization (50 → 25 items per batch)
- Add getMetadataBatch() and getVerbMetadataBatch() methods to S3 storage
- Update StorageAdapter interface with batch methods
- Add production environment auto-detection for smart logging
- Auto-cleanup legacy /index folder during initialization

Socket usage: Reduced from 1400+ concurrent to 3 max concurrent

Expected production result:
- Service initialization will complete successfully
- firehoseServiceInitialized: true
- Data collection will begin normally
- No more socket exhaustion errors (100 socket limit exceeded)

Fixes: #socket-exhaustion
Breaking: None - backward compatible with fallback modes
2025-08-07 11:46:07 -07:00
..
augmentations feat: add intelligent verb scoring system for automatic relationship weighting 2025-08-06 17:47:11 -07:00
distributed feat: migrate system metadata from 'index' to '_system' directory with backward compatibility 2025-08-06 09:45:56 -07:00
errors **feat: implement robust error-handling and operation utilities for storage adapters** 2025-07-30 11:35:09 -07:00
examples refactor: clean up deprecated functions and unused code 2025-08-05 10:16:05 -07:00
hnsw fix: correct typo in README major updates section 2025-08-06 12:29:32 -07:00
mcp **docs: update README to streamline server functionality documentation** 2025-07-15 11:51:27 -07:00
storage feat(storage): fix critical socket exhaustion during metadata reading 2025-08-07 11:46:07 -07:00
types feat\!: migrate from TensorFlow.js to Transformers.js with ONNX Runtime 2025-08-05 19:29:59 -07:00
utils feat(storage): fix critical socket exhaustion during metadata reading 2025-08-07 11:46:07 -07:00
augmentationFactory.ts Initial commit 2025-06-24 11:41:30 -07:00
augmentationPipeline.ts fix(src/augmentationPipeline): remove unnecessary whitespace for formatting consistency 2025-06-30 09:39:25 -07:00
augmentationRegistry.ts Initial commit 2025-06-24 11:41:30 -07:00
augmentationRegistryLoader.ts Initial commit 2025-06-24 11:41:30 -07:00
brainyData.ts feat(storage): fix critical socket exhaustion during metadata reading 2025-08-07 11:46:07 -07:00
browserFramework.ts refactor: simplify build system and improve model loading flexibility 2025-08-05 16:09:30 -07:00
coreTypes.ts feat(storage): fix critical socket exhaustion during metadata reading 2025-08-07 11:46:07 -07:00
demo.ts feat\!: migrate from TensorFlow.js to Transformers.js with ONNX Runtime 2025-08-05 19:29:59 -07:00
index.ts feat: add automatic adaptive performance optimization for high-volume scenarios 2025-08-07 08:37:15 -07:00
pipeline.ts Initial commit 2025-06-24 11:41:30 -07:00
sequentialPipeline.ts Initial commit 2025-06-24 11:41:30 -07:00
setup.ts feat\!: migrate from TensorFlow.js to Transformers.js with ONNX Runtime 2025-08-05 19:29:59 -07:00
unified.ts **docs: remove outdated statistics-related documentation and add standards** 2025-07-28 16:00:05 -07:00
worker.js **feat(cli, workers): introduce text encoding patches and worker improvements** 2025-07-04 14:42:33 -07:00
worker.ts **feat(tests): add tests for TextEncoder, TensorFlow.js, and fallback mechanisms** 2025-07-11 11:11:56 -07:00