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

Remove temporary files when we call finishZimCreation. #603

Merged
merged 3 commits into from
Aug 11, 2021

Conversation

mgautierfr
Copy link
Collaborator

@mgautierfr mgautierfr commented Aug 10, 2021

Fix #348

A time ago, the `write` method were writing everything.
But now, we are writing the clusters data during the creation.
So we are actually writing only the last parts (indexes, cluster offsets..)
We also call the helper from the destructor. This way threads are
destroyed correctly even if user don't call `finishZimCreation`.
The temporary data (idx files) are removed by the indexer destructor.
By deleting the handlers, we ensure we remove the temporary files as
soon we don't need them.

Fix #348
@codecov
Copy link

codecov bot commented Aug 10, 2021

Codecov Report

Merging #603 (5665796) into master (a249007) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #603      +/-   ##
==========================================
+ Coverage   82.78%   82.81%   +0.03%     
==========================================
  Files          91       91              
  Lines        3822     3829       +7     
  Branches     1703     1705       +2     
==========================================
+ Hits         3164     3171       +7     
  Misses        657      657              
  Partials        1        1              
Impacted Files Coverage Δ
include/zim/writer/creator.h 100.00% <ø> (ø)
src/writer/creator.cpp 84.82% <100.00%> (+0.38%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a249007...5665796. Read the comment docs.

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.

Zim creator finalize() should clean all the temporary fields
2 participants