lablup / lablup/backend.ai

Add BulkCreator for batch insert operations in repository base

Open
#7,793 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

## Motivation

Currently, `execute_creator` handles single row inserts. When inserting multiple rows,
calling it N times results in N flush operations, which is inefficient.

## Implementation

Add `BulkCreator` and `execute_bulk_creator` to handle multiple row inserts with:

- Single flush operation for all rows
- Consistent pattern with existing Creator abstraction

## Scope

- Add `BulkCreator` dataclass
- Add `BulkCreatorResult` dataclass
- Add `execute_bulk_creator` function
- Location: `src/ai/backend/manager/repositories/base/creator.py`

JIRA Issue: BA-3774

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.