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

Make collStats calculate collection size accurately for PostgreSQL statistics #3513

Merged
merged 8 commits into from
Oct 11, 2023

Conversation

chilagrow
Copy link
Member

@chilagrow chilagrow commented Oct 6, 2023

Description

Closes #3483.

Once #3466 is implemented, integration tests can be added for ensuring statistics are correct upon deleting documents after calling compact.

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.

@chilagrow chilagrow added the code/chore Code maintenance improvements label Oct 6, 2023
@chilagrow chilagrow self-assigned this Oct 6, 2023
@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #3513 (3dd8b1c) into main (d4e74d6) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3513      +/-   ##
==========================================
- Coverage   74.75%   74.65%   -0.10%     
==========================================
  Files         426      426              
  Lines       27162    27162              
==========================================
- Hits        20306    20279      -27     
- Misses       5642     5670      +28     
+ Partials     1214     1213       -1     
Files Coverage Δ
internal/backends/postgresql/postgresql.go 76.92% <100.00%> (ø)
internal/backends/sqlite/sqlite.go 80.32% <ø> (ø)

... and 12 files with indirect coverage changes

Flag Coverage Δ
filter-true 71.46% <100.00%> (-0.12%) ⬇️
hana-1 ?
integration 71.46% <100.00%> (-0.12%) ⬇️
mongodb-1 4.51% <0.00%> (ø)
pg-1 42.67% <0.00%> (ø)
pg-2 40.11% <0.00%> (ø)
pg-3 41.67% <0.00%> (-0.14%) ⬇️
postgresql-1 41.45% <100.00%> (ø)
postgresql-2 38.89% <100.00%> (ø)
postgresql-3 41.28% <100.00%> (+0.09%) ⬆️
sort-false 71.46% <100.00%> (-0.12%) ⬇️
sqlite-1 41.90% <0.00%> (+<0.01%) ⬆️
sqlite-2 39.16% <0.00%> (ø)
sqlite-3 40.99% <0.00%> (+0.13%) ⬆️
unit 22.24% <100.00%> (-0.11%) ⬇️

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

@mergify
Copy link
Contributor

mergify bot commented Oct 7, 2023

@chilagrow this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Oct 7, 2023
@mergify mergify bot removed the conflict PRs that have merge conflicts label Oct 10, 2023
@chilagrow chilagrow added this to the Next milestone Oct 10, 2023
@chilagrow chilagrow requested review from a team, rumyantseva and noisersup October 10, 2023 02:25
@chilagrow chilagrow marked this pull request as ready for review October 10, 2023 02:25
@chilagrow chilagrow requested a review from AlekSi as a code owner October 10, 2023 02:25
@mergify
Copy link
Contributor

mergify bot commented Oct 10, 2023

@chilagrow this pull request has merge conflicts.

@mergify mergify bot added the conflict PRs that have merge conflicts label Oct 10, 2023
@mergify mergify bot removed the conflict PRs that have merge conflicts label Oct 10, 2023
@chilagrow chilagrow changed the title Use table size used only for storing collection objects for PostgreSQL statistics Make collStats calculate collection size accurately for PostgreSQL statistics Oct 10, 2023
@chilagrow chilagrow enabled auto-merge (squash) October 11, 2023 02:10
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.

The changes look reasonable to me. Special thanks for extra comments and explanation!

@chilagrow chilagrow merged commit 57e283c into FerretDB:main Oct 11, 2023
29 checks passed
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.

Make collStats calculate collection size accurately after deletions of documents
3 participants