open-brainy/src/storage/adapters
David Snelling 1b265e8c42 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
..
baseStorageAdapter.ts feat: v0.49 - Filter discovery API, remove deprecated methods, improve performance 2025-08-06 14:39:33 -07:00
batchS3Operations.ts fix(build): resolve TypeScript compilation errors in optimization modules 2025-08-03 16:51:20 -07:00
fileSystemStorage.ts feat: v0.49 - Filter discovery API, remove deprecated methods, improve performance 2025-08-06 14:39:33 -07:00
memoryStorage.ts feat: v0.49 - Filter discovery API, remove deprecated methods, improve performance 2025-08-06 14:39:33 -07:00
opfsStorage.ts feat: implement pagination methods for OPFSStorage adapter 2025-08-06 15:00:34 -07:00
optimizedS3Search.ts fix: correct typo in README major updates section 2025-08-06 12:29:32 -07:00
s3CompatibleStorage.ts feat(storage): fix critical socket exhaustion during metadata reading 2025-08-07 11:46:07 -07:00