Skip to content
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

Perform insertMany in a single transaction #2532

Merged
merged 4 commits into from
May 10, 2023
Merged

Perform insertMany in a single transaction #2532

merged 4 commits into from
May 10, 2023

Conversation

raeidish
Copy link
Contributor

@raeidish raeidish commented Apr 29, 2023

Description

Closes #2510

Readiness checklist

  • I added/updated unit tests.
  • I added/updated integration/compatibility tests.
  • I added/updated comments and checked rendering.
  • I made spot refactorings.
  • I updated user documentation.
  • I ran task all, and it passed.
  • I ensured that PR title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@raeidish raeidish requested a review from a team as a code owner April 29, 2023 07:30
@raeidish raeidish requested review from AlekSi and chilagrow April 29, 2023 07:30
@codecov
Copy link

codecov bot commented Apr 29, 2023

Codecov Report

Merging #2532 (b9190a8) into main (05d493a) will decrease coverage by 0.20%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2532      +/-   ##
==========================================
- Coverage   27.23%   27.04%   -0.20%     
==========================================
  Files         414      414              
  Lines       20344    20365      +21     
==========================================
- Hits         5540     5507      -33     
- Misses      14226    14280      +54     
  Partials      578      578              
Impacted Files Coverage Δ
internal/handlers/pg/msg_findandmodify.go 0.00% <0.00%> (ø)
internal/handlers/pg/msg_insert.go 0.00% <0.00%> (ø)
internal/handlers/pg/msg_update.go 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes

Flag Coverage Δ
integration 5.44% <0.00%> (-0.01%) ⬇️
mongodb 5.44% <0.00%> (-0.01%) ⬇️
unit 25.39% <0.00%> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@raeidish raeidish marked this pull request as draft April 29, 2023 10:40
@raeidish raeidish marked this pull request as ready for review May 3, 2023 13:44
@raeidish raeidish requested a review from rumyantseva May 3, 2023 13:45
@chilagrow chilagrow requested a review from noisersup May 9, 2023 08:43
@AlekSi AlekSi removed request for rumyantseva and chilagrow May 9, 2023 08:44
@AlekSi AlekSi added this to the Next milestone May 9, 2023
@noisersup
Copy link
Member

Is there anything I can help with, or is this one ready for review?

@AlekSi
Copy link
Member

AlekSi commented May 9, 2023

(more specifically, we are not sure due to PR title 😄)

@raeidish
Copy link
Contributor Author

raeidish commented May 9, 2023

Aha! Sorry I’m a bit busy at the moment, the pr is ready for review. There was one suggestion where I would revert the changes to find and modify and update calls. This is because of the update function might return incorrect error messages

@noisersup noisersup changed the title pg_single_transaction_poc Perform insertMany in a single transaction May 10, 2023
Copy link
Member

@noisersup noisersup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I've tested it locally and there benchmark results have improved.

@noisersup noisersup enabled auto-merge (squash) May 10, 2023 10:45
@noisersup noisersup requested review from a team, w84thesun, rumyantseva and chilagrow May 10, 2023 10:45
Copy link
Contributor

@w84thesun w84thesun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raeidish thank you for your contribution!

@noisersup noisersup merged commit 09298ac into FerretDB:main May 10, 2023
@AlekSi AlekSi added the code/enhancement Some user-visible feature could work better label May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/enhancement Some user-visible feature could work better
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Perform insertMany in a single transaction
5 participants