lablup / lablup/backend.ai

Migrate error log to batched logging system

Open
#8,543 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

## Objective

Migrate error log creation from direct DB writes to the batched logging system.

## Implementation Details

### Repository Changes

1. **Update** `ErrorLogDBSource`
- Add `bulk_create()` method using `BulkCreator`
- Keep existing `create()` for backward compatibility
1. **Update** `ErrorLogRepository`
- Route `create()` calls to queue manager
- Add `flush()` method

### Service Changes

1. **Update** `ErrorLogService`
- Change `create()` to enqueue
- Return immediately

### Configuration

- Batch size: 100 (default)
- Flush interval: 5 seconds
- Redis backup: disabled (not critical)

## Testing

- Test error log enqueueing
- Test batch creation
- Integration tests

## Acceptance Criteria

- Error logs written in batches
- No functional regression
- Reduced DB load
- All tests passing

JIRA Issue: BA-4235

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.