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 statistics of indexes for collStats and dbStats for SQLite backend #3361

Merged
merged 10 commits into from
Sep 20, 2023

Conversation

rumyantseva
Copy link
Contributor

@rumyantseva rumyantseva commented Sep 14, 2023

Description

Closes #3293.

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.

@rumyantseva rumyantseva added the code/chore Code maintenance improvements label Sep 14, 2023
@rumyantseva rumyantseva added this to the Next milestone Sep 14, 2023
@rumyantseva rumyantseva self-assigned this Sep 14, 2023
@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Merging #3361 (51cc19a) into main (c844bcc) will decrease coverage by 0.09%.
The diff coverage is 82.08%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3361      +/-   ##
==========================================
- Coverage   74.17%   74.08%   -0.09%     
==========================================
  Files         413      414       +1     
  Lines       25312    25330      +18     
==========================================
- Hits        18775    18766       -9     
- Misses       5445     5464      +19     
- Partials     1092     1100       +8     
Files Changed Coverage
internal/backends/sqlite/sqlite.go 80.64%
internal/backends/sqlite/collection.go 100.00%
internal/backends/sqlite/database.go 100.00%
Flag Coverage Δ
hana-1 ?
hana-2 ?
hana-3 ?
integration 71.03% <82.08%> (-0.09%) ⬇️
mongodb-1 4.72% <0.00%> (-0.01%) ⬇️
pg-1 43.71% <0.00%> (-0.08%) ⬇️
pg-2 43.48% <0.00%> (-0.04%) ⬇️
pg-3 43.93% <0.00%> (-0.04%) ⬇️
sqlite-1 42.61% <82.08%> (-0.03%) ⬇️
sqlite-2 42.11% <82.08%> (+0.02%) ⬆️
sqlite-3 42.92% <80.59%> (-0.11%) ⬇️
unit 23.31% <82.08%> (+0.04%) ⬆️

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

@rumyantseva rumyantseva marked this pull request as ready for review September 14, 2023 16:59
@rumyantseva rumyantseva requested review from AlekSi and a team as code owners September 14, 2023 16:59
@rumyantseva rumyantseva enabled auto-merge (squash) September 14, 2023 16:59
@rumyantseva rumyantseva requested review from a team and noisersup September 14, 2023 16:59
chilagrow
chilagrow previously approved these changes Sep 15, 2023
Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

awesome work! 🚀

@AlekSi AlekSi added code/enhancement Some user-visible feature could work better and removed code/chore Code maintenance improvements labels Sep 15, 2023
internal/backends/sqlite/database.go Outdated Show resolved Hide resolved
internal/backends/sqlite/database.go Outdated Show resolved Hide resolved
internal/backends/sqlite/database.go Outdated Show resolved Hide resolved
internal/backends/sqlite/database.go Outdated Show resolved Hide resolved
internal/backends/sqlite/database.go Outdated Show resolved Hide resolved
Copy link
Member

@AlekSi AlekSi left a comment

Choose a reason for hiding this comment

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

Let's also move relationStats into its own file (it is not only about database.go, after all) and rename it to collectionStats or something (we are not a relational database 😬)

noisersup
noisersup previously approved these changes Sep 18, 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

chilagrow
chilagrow previously approved these changes Sep 19, 2023
Copy link
Member

@AlekSi AlekSi left a comment

Choose a reason for hiding this comment

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

Let's also move relationStats into its own file (it is not only about database.go, after all)

That part wasn't done

@rumyantseva rumyantseva requested a review from AlekSi September 19, 2023 07:17
Copy link
Member

@chilagrow chilagrow left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@rumyantseva rumyantseva merged commit 8425016 into FerretDB:main Sep 20, 2023
@rumyantseva rumyantseva deleted the issue-3293-indexes-stats branch September 20, 2023 08:12
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.

Return statistics of indexes for collStats and dbStats for SQLite backend
4 participants