Open
Description
The current implementation of bulk database operations in Augur uses a recursive approach for error handling that could lead to several issues:
- Stack Overflow: The recursive approach in
bulk_insert_dicts
could cause stack overflow for large datasets - Inefficient Error Recovery: The current implementation splits data in half on any error, which is inefficient
- Lack of Error Categorization: Different types of errors are handled the same way
Proposed Solution:
- Implement an iterative approach for handling large datasets
- Add proper error categorization and specific handling strategies
- Implement a more efficient retry mechanism with exponential backoff
- Add better logging and monitoring for database operations
Technical Details:
- Current implementation in
application/db/lib.py
andapplication/db/session.py
- Affects all bulk database operations across the application
- Impact on performance and reliability of data collection
Expected Outcome:
- More reliable database operations
- Better error recovery
- Improved performance for large datasets
- Better monitoring and debugging capabilities
Metadata
Metadata
Assignees
Labels
No labels