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

Return correct response if unique index violation happened on SQLite backend #3353

Merged
merged 4 commits into from Sep 14, 2023

Conversation

rumyantseva
Copy link
Member

@rumyantseva rumyantseva commented Sep 13, 2023

Description

Closes #3183.

The approach with WriteError is the same as in msg_insert for consistency purposes.

Readiness checklist

  • I added/updated unit tests (and they pass).
  • I added/updated integration/compatibility tests (and they pass).
  • 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), Milestone (Next), Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Merging #3353 (3a95662) into main (481bc96) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3353      +/-   ##
==========================================
+ Coverage   74.03%   74.11%   +0.07%     
==========================================
  Files         413      413              
  Lines       25292    25305      +13     
==========================================
+ Hits        18726    18755      +29     
+ Misses       5475     5465      -10     
+ Partials     1091     1085       -6     
Files Changed Coverage
internal/handlers/sqlite/msg_update.go 100.00%
Flag Coverage Δ
hana-1 ?
hana-2 ?
hana-3 ?
integration 71.14% <100.00%> (+0.06%) ⬆️
mongodb-1 4.73% <0.00%> (-0.01%) ⬇️
pg-1 44.57% <0.00%> (-0.02%) ⬇️
pg-2 44.74% <0.00%> (-0.03%) ⬇️
pg-3 42.31% <0.00%> (-0.03%) ⬇️
sqlite-1 43.13% <100.00%> (-0.06%) ⬇️
sqlite-2 43.57% <33.33%> (+0.02%) ⬆️
sqlite-3 41.22% <33.33%> (-0.01%) ⬇️
unit 23.03% <0.00%> (-0.02%) ⬇️

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

@rumyantseva rumyantseva changed the title Fix indexes for SQLite Return the correct response in case unique index violation happened on SQLite backend Sep 13, 2023
@rumyantseva rumyantseva changed the title Return the correct response in case unique index violation happened on SQLite backend Return the correct response if unique index violation happened on SQLite backend Sep 13, 2023
@rumyantseva rumyantseva changed the title Return the correct response if unique index violation happened on SQLite backend Return correct response if unique index violation happened on SQLite backend Sep 13, 2023
@rumyantseva rumyantseva added the code/chore Code maintenance improvements label Sep 13, 2023
@rumyantseva rumyantseva marked this pull request as ready for review September 13, 2023 19:29
@rumyantseva rumyantseva requested a review from a team as a code owner September 13, 2023 19:29
@rumyantseva rumyantseva enabled auto-merge (squash) September 13, 2023 19:29
@rumyantseva rumyantseva requested review from a team and noisersup September 13, 2023 19:29
@rumyantseva rumyantseva added this to the Next milestone Sep 13, 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.

LGTM

@rumyantseva rumyantseva merged commit 3681c4c into FerretDB:main Sep 14, 2023
29 of 30 checks passed
@rumyantseva rumyantseva deleted the issue-3183-fix-indexes branch September 14, 2023 02:17
@AlekSi AlekSi modified the milestones: Next, v1.10.0 Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Fix indexes for SQLite
4 participants