-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve batch insert #3287
improve batch insert #3287
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ No documentation updates required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Enhanced batch insert functionality for improved database performance in input record creation and experiment management.
- Added
createInputRecords
method in/valhalla/jawn/src/managers/inputs/InputsManager.ts
for efficient bulk insertion using a single SQL query - Optimized
/valhalla/jawn/src/managers/experiment/ExperimentV2Manager.ts
to use batch operations instead of individual Promise.all calls - Implemented UUID generation and parameterized values for secure batch processing
- Added organization-level validation checks for prompt versions in batch operations
2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
return err(result.error); | ||
} | ||
|
||
return ok(inputRecordIds); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: returning inputRecordIds without verifying successful insertion of all records. Should compare result.data.length with inputs.length
return ok(inputRecordIds); | |
if (result.data?.length !== inputs.length) { | |
return err('Not all records were inserted successfully'); | |
} | |
return ok(inputRecordIds); |
Summary
⏳ 5 tests in progress |
No description provided.