aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/filesystem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* improved assert (#37)Dan Engelbrecht2024-04-041-1/+1
| | | | - Improvement: Add file and line to ASSERT exceptions - Improvement: Catch call stack when throwing assert exceptions and log/output call stack at important places to provide more context to caller
* fix potential partially written files (#2)Dan Engelbrecht2024-03-131-1/+9
| | | | * Make sure WriteFile() does not leave incomplete files * use TemporaryFile and MoveTemporaryIntoPlace to avoid leaving partial files on error
* Make sure that PathFromHandle don't hide true error when throwing exceptions ↵Dan Engelbrecht2023-12-111-6/+6
| | | | | | | | | (#600) * Make sure that PathFromHandle don't hide true error when throwing exceptions * changelog * return error info in PathFromHandle if path fails to resolve
* optimized index snapshot reading/writing (#561)Stefan Boberg2023-11-271-2/+23
| | | | | the previous implementation of in-memory index snapshots serialise data to memory before writing to disk and vice versa when reading. This leads to some memory spikes which end up pushing useful data out of system cache and also cause stalls on I/O operations. this change moves more code to a streaming serialisation approach which scales better from a memory usage perspective and also performs much better
* fix block cloning copy argument validation (#560)Stefan Boberg2023-11-221-0/+30
|
* zen run command (#552)Stefan Boberg2023-11-211-0/+119
| | | | | | | | | | initial version -- this is primarily intended to be used for running stress tests and/or benchmarks example usage: `zen run -n 10 -- zenserver-test` `zen run -n 10 -- zenserver-test --ts=core.assert` run zenserver-test 10 times (testing only the `core.assert` test suite) `zen run --time 600 --basepath=d:\test_dir\test1 -- zenserver-test` keeps spawning new instances for 10 minutes (600 seconds)
* moved process handling code into separate h/cpp (#555)Stefan Boberg2023-11-201-0/+1
|
* add zenserver state snapshot support (#543)Stefan Boberg2023-11-161-0/+97
| | | | | this introduces a --snapshot-dir command line option to zenserver which specifies a directory which will be propagated to the persistence root directory on start-up. This is most powerful with file systems which support block cloning, such as ReFS on Windows. This allows even very large state snapshots to be used repeatedly without having to worry about mutating the original dataset on disk. When using ReFS the state copy for even large state directories can be very fast since the duration is primarily proportional to the number of files in the tree rather than the size of the files being cloned. The storage requirements are also minimal as all data will be handled in a copy-on-write manner.
* gc history log (#519)Dan Engelbrecht2023-11-131-0/+64
| | | | | - Feature: Writes a `gc.log` with settings and detailed result after each GC execution (version 2 only) - Break out file name rotate to allow access for gclog - CompactBinaryToJson(MemoryView Data, StringBuilderBase& InBuilder)
* If a directory is deleted while we try to traverse it, skip it and continue ↵Dan Engelbrecht2023-11-101-0/+11
| | | | (#528)
* VFS implementation for local storage service (#396)Stefan Boberg2023-09-201-8/+67
| | | currently, only Windows (using Projected File System) is supported
* Make sure error logging or destructors don't throw exception when trying to ↵Dan Engelbrecht2023-09-121-13/+44
| | | | | get file name from handle (#393) - Bugfix: Make sure error logging or destructors don't throw exception when trying to get file name from handle
* Extend http client (#387)Dan Engelbrecht2023-09-081-0/+63
| | | * extend http client with configuration, headers, parameters and disk streaming upload/download
* stream oplog attachments from jupiter (#384)Dan Engelbrecht2023-09-061-1/+1
| | | | | | | | | | * 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
* lua config file improvements (#379)Dan Engelbrecht2023-08-311-0/+4
| | | | | | - Bugfix: All options given on command line now overrides lua config file settings - Improvement: All options available from command line can now be configured in the lua config file (with a few exceptions such as `owner-pid`, `install` and `uninstall`) We can now also generate a Lua config (just string so far) that includes all options given on command line together with any optional Lua input config file. The idea here is to be able to save config options in the future.
* Run clang tidy on modified filezousar2023-08-181-4/+4
|
* Reduce log level for RLIMIT messagezousar2023-08-181-1/+1
|
* * Added Guid::FromStringStefan Boberg2023-06-301-8/+61
| | | | | | | * Added LoadCompactBinaryObject from file to compactbinaryfile.cpp/h * Added SaveCompactBinary(BinaryWriter& Ar, ...) functions * Added ZEN_PLATFORM_NAME define * Added SystemMetrics functionality to query system properties (see zencore/system.h)
* Make sure GetEnvVariable can handle values that are longer than 1023 ↵Dan Engelbrecht2023-06-131-4/+18
| | | | characters (#332)
* Remove ATL header usage (#306)Stefan Boberg2023-05-151-30/+30
| | | ATL has been used here and there as a convenience. Given that this is a legacy component and not always something which gets installed along with the compiler we hereby remove the dependency altogether in favour of our own simple wrappers
* add context to MapViewOfFile errors (#282)Stefan Boberg2023-05-091-0/+21
| | | | * added FileSizeFromHandle function * added file size to error message when MapViewOfFile fails
* moved source directories into `/src` (#264)Stefan Boberg2023-05-021-0/+1304
* moved source directories into `/src` * updated bundle.lua for new `src` path * moved some docs, icon * removed old test trees