Skip to content

Commit

Permalink
Update archive's uncompressed size just before a segment's files are …
Browse files Browse the repository at this point in the history
…deallocated; fixes gh-15. (#16)
  • Loading branch information
kirkrodrigues authored Oct 12, 2021
1 parent 01c33c3 commit 7647dab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/core/src/streaming_archive/writer/Archive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ namespace streaming_archive { namespace writer {

for (auto file : files) {
file->mark_as_in_committed_segment();
m_stable_uncompressed_size += file->get_num_uncompressed_bytes();
}

m_global_metadata_db->open();
Expand All @@ -482,6 +481,7 @@ namespace streaming_archive { namespace writer {

for (auto file : files) {
file->cleanup_after_segment_insertion();
m_stable_uncompressed_size += file->get_num_uncompressed_bytes();
delete file;
}
files.clear();
Expand Down

0 comments on commit 7647dab

Please sign in to comment.