Skip to content

Improve Error Handling in Bulk Database Operations #3113

Open
@KhanRayyan3622

Description

@KhanRayyan3622

The current implementation of bulk database operations in Augur uses a recursive approach for error handling that could lead to several issues:

  1. Stack Overflow: The recursive approach in bulk_insert_dicts could cause stack overflow for large datasets
  2. Inefficient Error Recovery: The current implementation splits data in half on any error, which is inefficient
  3. Lack of Error Categorization: Different types of errors are handled the same way

Proposed Solution:

  1. Implement an iterative approach for handling large datasets
  2. Add proper error categorization and specific handling strategies
  3. Implement a more efficient retry mechanism with exponential backoff
  4. Add better logging and monitoring for database operations

Technical Details:

  • Current implementation in application/db/lib.py and application/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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions