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

Do not detect clone entry as duplicated content. #379

Merged
merged 3 commits into from
Dec 18, 2023
Merged

Conversation

mgautierfr
Copy link
Collaborator

If two entries point to the same tuple (cluter_id, blob_id), we must not report them as duplicated content.

Depends of openzim/libzim#833

Missing: Test of the check with a zim file actually containing clone entries.

@kelson42 kelson42 marked this pull request as ready for review December 4, 2023 15:58
Copy link

codecov bot commented Dec 4, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (95af479) 28.00% compared to head (48616c5) 27.93%.

Files Patch % Lines
src/zimcheck/checks.cpp 20.00% 1 Missing and 7 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #379      +/-   ##
==========================================
- Coverage   28.00%   27.93%   -0.08%     
==========================================
  Files          26       26              
  Lines        2582     2585       +3     
  Branches     1373     1376       +3     
==========================================
- Hits          723      722       -1     
- Misses       1375     1376       +1     
- Partials      484      487       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@veloman-yunkan veloman-yunkan left a comment

Choose a reason for hiding this comment

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

From the functionality point of view it should work, but I have a couple of comments regarding the performance impact of this fix.

src/zimcheck/checks.cpp Outdated Show resolved Hide resolved
src/zimcheck/checks.cpp Outdated Show resolved Hide resolved
@kelson42
Copy link
Contributor

@mgautierfr Now that libzim 9.1.0 has been released, we should finish/merge this PR.

Copy link
Collaborator

@veloman-yunkan veloman-yunkan left a comment

Choose a reason for hiding this comment

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

Please rebase-fixup while addressing the last comment and the PR can be merged.

src/zimcheck/checks.cpp Outdated Show resolved Hide resolved
@mgautierfr
Copy link
Collaborator Author

Last comment fixed.
Commits are already fixed up.
New (last) commit remove std::hash specialization as we are now > c++14.

If two entries point to the same tuple (cluter_id, blob_id), we must
not report them as duplicated content.
@mgautierfr
Copy link
Collaborator Author

CI for packages on debian unstable is failing because of a wrong version of libzim available.
I'm merging this issue as it is not related (or it is related, but it's not here that we will fix this)

@mgautierfr mgautierfr merged commit bb6d10f into main Dec 18, 2023
11 of 13 checks passed
@mgautierfr mgautierfr deleted the clone_check branch December 18, 2023 13:43
@mgautierfr
Copy link
Collaborator Author

Fix #377

@kelson42 kelson42 added this to the 3.4.0 milestone Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants