diff options
| author | Dan Engelbrecht <[email protected]> | 2025-05-07 10:23:42 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-05-07 10:23:42 +0200 |
| commit | 68938614c95635045a394ff0a52786b82f01ffc4 (patch) | |
| tree | 6193f85d4fe3ec154e78bb494b979a91733f9ae6 /src/zencore/include | |
| parent | added logic to handle empty directories correctly (#383) (diff) | |
| download | zen-68938614c95635045a394ff0a52786b82f01ffc4.tar.xz zen-68938614c95635045a394ff0a52786b82f01ffc4.zip | |
optimize block store CompactBlocks (#384)
- Improvement: Optimize block compact reducing memcpy operations
- Improvement: Handle padding of block store blocks when compacting to avoid excessive flusing of write buffer
- Improvement: Handle padding when writing oplog index snapshot to avoid unnecessary flushing of write buffer
Diffstat (limited to 'src/zencore/include')
| -rw-r--r-- | src/zencore/include/zencore/basicfile.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/zencore/include/zencore/basicfile.h b/src/zencore/include/zencore/basicfile.h index 57798b6f4..465499d2b 100644 --- a/src/zencore/include/zencore/basicfile.h +++ b/src/zencore/include/zencore/basicfile.h @@ -174,9 +174,11 @@ public: BasicFileWriter(BasicFile& Base, uint64_t BufferSize); ~BasicFileWriter(); - void Write(const void* Data, uint64_t Size, uint64_t FileOffset); - void Write(const CompositeBuffer& Data, uint64_t FileOffset); - void Flush(); + void Write(const void* Data, uint64_t Size, uint64_t FileOffset); + void Write(const CompositeBuffer& Data, uint64_t FileOffset); + void AddPadding(uint64_t Padding); + uint64_t AlignTo(uint64_t Alignment); + void Flush(); private: BasicFile& m_Base; |