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

Add more data to output of collStats and dbStats #3538

Merged
merged 32 commits into from
Oct 16, 2023

Conversation

chilagrow
Copy link
Member

@chilagrow chilagrow commented Oct 10, 2023

Description

Closes #2447.
Closes #3521.

This is analysis of the issue.
Keep #2447 open, capped collection related things can't be tested until #3458 is done, freeStorageSize needs to be implemented.

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 Oct 10, 2023

Codecov Report

Merging #3538 (cfda6e0) into main (9d3a3e1) will decrease coverage by 0.20%.
The diff coverage is 64.91%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3538      +/-   ##
==========================================
- Coverage   61.51%   61.31%   -0.20%     
==========================================
  Files         426      426              
  Lines       27225    27298      +73     
==========================================
- Hits        16748    16739       -9     
- Misses       9489     9555      +66     
- Partials      988     1004      +16     
Files Coverage Δ
internal/backends/collection.go 91.66% <ø> (ø)
internal/backends/database.go 97.10% <ø> (ø)
internal/backends/postgresql/collection.go 68.38% <100.00%> (-0.11%) ⬇️
internal/backends/postgresql/database.go 71.42% <100.00%> (+5.07%) ⬆️
internal/backends/sqlite/collection.go 73.66% <100.00%> (-1.09%) ⬇️
internal/backends/sqlite/database.go 76.13% <100.00%> (-0.54%) ⬇️
internal/handlers/sqlite/msg_datasize.go 61.90% <100.00%> (ø)
internal/backends/postgresql/postgresql.go 76.31% <0.00%> (-0.61%) ⬇️
internal/backends/sqlite/sqlite.go 79.66% <0.00%> (-0.67%) ⬇️
internal/handlers/sqlite/msg_collstats.go 64.35% <66.66%> (-1.36%) ⬇️
... and 2 more

... and 7 files with indirect coverage changes

Flag Coverage Δ
filter-true 57.84% <64.91%> (-0.16%) ⬇️
hana-1 ?
integration 57.84% <64.91%> (-0.16%) ⬇️
mongodb-1 4.49% <0.00%> (-0.02%) ⬇️
postgresql-1 40.77% <33.33%> (-0.45%) ⬇️
postgresql-2 41.48% <59.64%> (+0.70%) ⬆️
postgresql-3 39.55% <36.84%> (-0.05%) ⬇️
sort-false 57.84% <64.91%> (-0.16%) ⬇️
sqlite-1 40.43% <33.33%> (-0.69%) ⬇️
sqlite-2 41.83% <59.64%> (+0.52%) ⬆️
sqlite-3 39.69% <36.84%> (+0.13%) ⬆️
unit 22.28% <8.77%> (-0.14%) ⬇️

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

@chilagrow chilagrow added the code/enhancement Some user-visible feature could work better label Oct 12, 2023
@chilagrow chilagrow added this to the Next milestone Oct 12, 2023
@chilagrow chilagrow marked this pull request as ready for review October 12, 2023 04:04
@chilagrow chilagrow requested review from AlekSi and a team as code owners October 12, 2023 04:04
@chilagrow chilagrow requested a review from rumyantseva October 12, 2023 04:04
@chilagrow chilagrow enabled auto-merge (squash) October 12, 2023 04:04
@chilagrow chilagrow requested review from a team and noisersup October 12, 2023 04:05
@chilagrow chilagrow added the code/chore Code maintenance improvements label Oct 12, 2023
@chilagrow chilagrow removed the code/enhancement Some user-visible feature could work better label Oct 12, 2023
@mergify
Copy link
Contributor

mergify bot commented Oct 12, 2023

@chilagrow this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Oct 12, 2023
@mergify mergify bot removed the conflict PRs that have merge conflicts label Oct 13, 2023
integration/commands_administration_compat_test.go Outdated Show resolved Hide resolved
internal/handlers/sqlite/msg_aggregate.go Outdated Show resolved Hide resolved
internal/handlers/sqlite/msg_collstats.go Outdated Show resolved Hide resolved
internal/backends/collection.go Outdated Show resolved Hide resolved
@chilagrow chilagrow requested a review from AlekSi October 13, 2023 10:33
Copy link
Contributor

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

Great job overall, left one suggestion.

internal/handlers/sqlite/msg_collstats.go Show resolved Hide resolved
internal/handlers/sqlite/msg_aggregate.go Outdated Show resolved Hide resolved
integration/commands_administration_compat_test.go Outdated Show resolved Hide resolved
integration/commands_administration_compat_test.go Outdated Show resolved Hide resolved
internal/backends/collection.go Outdated Show resolved Hide resolved
internal/backends/collection.go Outdated Show resolved Hide resolved
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 merged commit b444693 into FerretDB:main Oct 16, 2023
26 checks passed

var found bool

for _, cInfo := range cList.Collections {
Copy link
Member

@AlekSi AlekSi Oct 16, 2023

Choose a reason for hiding this comment

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

- for _, cInfo := range list.Collections
+ for _, cInfo = range list.Collections

I will do that in my PR

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
4 participants