aboutsummaryrefslogtreecommitdiff
path: root/zencore/iobuffer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* moved source directories into `/src` (#264)Stefan Boberg2023-05-021-653/+0
| | | | | | * moved source directories into `/src` * updated bundle.lua for new `src` path * moved some docs, icon * removed old test trees
* log error before throwing exception so we can see the callstackDan Engelbrecht2023-04-261-1/+8
|
* make sure we pick up the error code before it is cleared when throwing errorDan Engelbrecht2023-04-261-1/+2
|
* optimizations (#200)Dan Engelbrecht2022-12-071-4/+33
| | | | | | | | | | | | | * Use direct file read and direct buffer allocation for small IoBuffer materalization * Reduce range of materialized data in CompositeBuffer reading CompressedBuffer header reading often only need a small part and not the whole file * reduce lock contention in IoBuffer::Materialize * Reduce parsing of compressed headers Validate header type at decompression * faster CreateDirectories - start from leaf going up and recurse back * optimized BufferHeader::IsValid * Add ValidateCompressedHeader to use when we don't need the actual compressed data Validate that we always get compressed data in CidStore::AddChunk * changelog
* Support file reference in package message (#184)Dan Engelbrecht2022-11-071-27/+9
| | | | | | | | * Fix packed message parsing for absolute path * Always enable are sharing when opening files as IoBuffers. * Allow control over sending partial files as localfile ref * Check "AcceptFlags" field in RPC message for allowing localfile ref in reply * make oplog entry add operations ZEN_DEBUG level logs * changelog
* Handle zero size file mapping (#177)Dan Engelbrecht2022-09-301-1/+10
| | | | * Handle edgecase with zero size memory mapping of file * changelog
* merged from mainStefan Boberg2022-06-161-0/+2
|
* fix argument order in IoBufferBuilder::MakeFromFileWithSharedDeleteDan Engelbrecht2022-05-301-1/+1
|
* create local utility function for IoBufferBuilder::MakeFromFile*Dan Engelbrecht2022-05-301-48/+25
|
* Enable FILE_SHARE_DELETE on standalone files in disk bucketsDan Engelbrecht2022-05-281-0/+45
| | | | | | | | This allows us to delete the file even if it is open for read. We do a delete, the rename since we are not allowed to do a rename-overwrite, only delete. As we have the shard lock for the file we want to replace we can safely do a delete+rename. In the rare case that we fail to rename the file into place the old data is lost. As this is a *cache* and it should be very rare this is OK.
* Make sure blockstore owner and block store state does not get out of sync ↵Dan Engelbrecht2022-05-081-0/+30
| | | | | | when fetching a chunk Move MarkAsDeleteOnClose() to IoBuffer(ExtendedCore) and set it on close, SetFileInformationByHandle sometimes fails if done in parallel with FileMapping
* use IsPow2 for mapping lock countDan Engelbrecht2022-04-291-1/+1
|
* naming cleanupDan Engelbrecht2022-04-281-3/+6
|
* Reduce risk of reallocating backing std::vector in CbWriter::AddBinaryDan Engelbrecht2022-04-281-2/+10
| | | | | Shard up g_MappingLock in IoBufferExtendedCore::Materialize() to reduce contention during high load Don't queue upstream cache records if we don't have any upstreams
* review feedbackDan Engelbrecht2022-03-311-1/+1
|
* Remove bad kIsOwnedByThisDan Engelbrecht2022-03-311-1/+1
|
* linux fixesDan Engelbrecht2022-03-311-3/+1
|
* remove test codeDan Engelbrecht2022-03-311-4/+0
|
* Manage lifetime of FileHandleDan Engelbrecht2022-03-311-1/+6
|
* clang-formatDan Engelbrecht2022-03-211-1/+1
|
* clang-formatStefan Boberg2022-02-021-1/+1
|
* Format fix.Per Larsson2022-01-221-3/+5
|
* Fixed up compile errors if mimalloc use is disabledMartin Ridgers2022-01-141-0/+1
|
* Converted use of _format UDL to fmt::formatMartin Ridgers2022-01-101-4/+2
|
* Merged main.Per Larsson2021-12-141-13/+18
|\
| * Dependent variable definition as inside a if-Windows blockMartin Ridgers2021-12-081-6/+7
| |
| * Merged mainMartin Ridgers2021-12-081-24/+31
| |\
| * \ Merged mainMartin Ridgers2021-10-251-1/+1
| |\ \
| * | | Implemented ReadFromFileMaybe() for POSIXMartin Ridgers2021-10-181-4/+8
| | | |
| * | | Merged mainMartin Ridgers2021-10-161-2/+7
| |\ \ \
| * \ \ \ Merged mainMartin Ridgers2021-10-151-24/+59
| |\ \ \ \
| * | | | | Use std::fs::path for IoBuffer::MakeFromFile().Martin Ridgers2021-10-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is more consistent with MakeFromTempFile() and almost all arguments are path objects anyway.
* | | | | | Format fix.Per Larsson2021-12-091-1/+1
| | | | | |
* | | | | | Merged main.Per Larsson2021-12-091-24/+31
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | |
| * | | | | Fixes from code reviewMatt Peters2021-12-031-5/+7
| | | | | |
| * | | | | Make IoBufferCore::Materialize threadsafeMatt Peters2021-12-021-24/+29
| | |_|_|/ | |/| | |
* / | | | clang-formatStefan Boberg2021-10-231-1/+1
|/ / / /
* | | / Format fix.Per Larsson2021-10-201-1/+1
| |_|/ |/| |
* | | zencore: Enabled MSC warning 4668 to get warnings when preprocessor macros ↵Stefan Boberg2021-10-151-2/+7
| |/ |/| | | | | | | | | | | | | are used without an explicit definition Also fixed up various code to compile with this, by using ZEN_THIRD_PARTY_INCLUDES_START/ZEN_THIRD_PARTY_INCLUDES_END macros Removed prewindows.h/postwindows.h since they are no longer to be used due to the above
* | asio HTTP implementation (#23)Stefan Boberg2021-10-141-24/+59
|/ | | asio-based HTTP implementation
* iobuffer: Changed MakeFromTemporaryFile so it accepts a path instead of a ↵Stefan Boberg2021-10-081-3/+3
| | | | character pointer
* Added explicit mimalloc IoBuffer allocation pathStefan Boberg2021-10-011-38/+43
|
* memory: Added experimental mimalloc path to AlignedAllocImpl/AlignedFreeImplStefan Boberg2021-09-301-9/+28
| | | | | | Also added similar path to IoBuffer Cannot be enabled at the moment as we end up passing pointers to std::free via some path so more work will be necessary
* Merged latest from mainStefan Boberg2021-09-271-9/+17
|\
| * Added HashBuffer(IoBuffer&) overload with trivial (but inappropriate for the ↵Stefan Boberg2021-09-231-0/+8
| | | | | | | | longer term) implementation
* | Merged main into linux-macMartin Ridgers2021-09-211-2/+7
|\|
| * It's not possible to compile out testsStefan Boberg2021-09-201-2/+7
| | | | | | | | Tests are now compiled in if `ZEN_WITH_TESTS=1`, and compiled out if not. Compiling tests out reduces the footprint of the resulting executables quite significantly.
* | Removed external linkage from g_MappingLockMartin Ridgers2021-09-161-1/+1
| |
* | MakeFromTemporaryFile() on POSIXMartin Ridgers2021-09-161-7/+26
| |
* | MakeFromFile() on POSIXMartin Ridgers2021-09-161-23/+43
| |