aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/blockstore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-09-05 18:53:44 -0400
committerGitHub <[email protected]>2023-09-06 00:53:44 +0200
commit832a1b464633ec7a31a8aad386520e1990d0b6cb (patch)
treea07ba97f28fbe90e5aac8ea5d086f687e7aa38bd /src/zenstore/blockstore.cpp
parentretry file create (#383) (diff)
downloadzen-832a1b464633ec7a31a8aad386520e1990d0b6cb.tar.xz
zen-832a1b464633ec7a31a8aad386520e1990d0b6cb.zip
stream oplog attachments from jupiter (#384)
* stream large downloads from jupiter to temporary file * rework DeleteOnClose - top level marks file for delete and if lower level parts wants to keep it it clears that flag * changelog * log number of attachments to download * add delay on jupiter request failure when retrying * make sure we upload all attachments even if Needs are empty when ForceUpload is true release TempAttachment as soon as it is used * sort attachments so we get predictable blocks for the same oplog
Diffstat (limited to 'src/zenstore/blockstore.cpp')
-rw-r--r--src/zenstore/blockstore.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/zenstore/blockstore.cpp b/src/zenstore/blockstore.cpp
index abf77f8a6..cdd7abae7 100644
--- a/src/zenstore/blockstore.cpp
+++ b/src/zenstore/blockstore.cpp
@@ -60,7 +60,7 @@ BlockStoreFile::Open()
return true;
});
void* FileHandle = m_File.Handle();
- m_IoBuffer = IoBuffer(IoBuffer::File, FileHandle, 0, m_File.FileSize());
+ m_IoBuffer = IoBuffer(IoBuffer::File, FileHandle, 0, m_File.FileSize(), /*IsWholeFile*/ true);
}
void
@@ -88,7 +88,7 @@ BlockStoreFile::Create(uint64_t InitialSize)
// We map our m_IoBuffer beyond the file size as we will grow it over time and want
// to be able to create sub-buffers of all the written range later
- m_IoBuffer = IoBuffer(IoBuffer::File, FileHandle, 0, InitialSize);
+ m_IoBuffer = IoBuffer(IoBuffer::File, FileHandle, 0, InitialSize, false);
}
uint64_t
@@ -100,7 +100,7 @@ BlockStoreFile::FileSize()
void
BlockStoreFile::MarkAsDeleteOnClose()
{
- m_IoBuffer.MarkAsDeleteOnClose();
+ m_IoBuffer.SetDeleteOnClose(true);
}
IoBuffer