make writing safe (by using a tmp file and moving to actual location)

This commit is contained in:
2024-02-19 20:32:56 +01:00
parent 67c6f9adb0
commit 0896038dd6
3 changed files with 32 additions and 7 deletions

View File

@@ -105,8 +105,8 @@ void MessageFragmentStore::handleMessage(const Message3Handle& m) {
if (fragment_uid.empty()) {
for (auto& [ts_begin, ts_end, fid] : fuid_open) {
const int64_t frag_range = int64_t(ts_end) - int64_t(ts_begin);
//constexpr static int64_t max_frag_ts_extent {1000*60*60};
constexpr static int64_t max_frag_ts_extent {1000*60*3}; // 3min for testing
constexpr static int64_t max_frag_ts_extent {1000*60*60};
//constexpr static int64_t max_frag_ts_extent {1000*60*3}; // 3min for testing
const int64_t possible_extention = max_frag_ts_extent - frag_range;
// which direction