aboutsummaryrefslogtreecommitdiff
path: root/src/zenutil/basicfile.cpp
Commit message (Collapse)AuthorAgeFilesLines
* move basicfile.h/cpp -> zencore (#273)Dan Engelbrecht2025-01-161-1033/+0
| | | | | | move jupiter.h/cpp -> zenutil move packageformat.h/.cpp -> zenhttp zenutil now depends on zenhttp instead of the inverse
* Insights-compatible memory tracking (#214)Stefan Boberg2024-11-251-0/+1
| | | | | | | | | | | | | This change introduces support for tracing of memory allocation activity. The code is ported from UE5, and Unreal Insights can be used to analyze the output. This is currently only fully supported on Windows, but will be extended to Mac/Linux in the near future. To activate full memory tracking, pass `--trace=memory` on the commandline alongside `--tracehost=<ip>` or `-tracefile=<path>`. For more control over how much detail is traced you can instead pass some combination of `callstack`, `memtag`, `memalloc` instead. In practice, `--trace=memory` is an alias for `--trace=callstack,memtag,memalloc`). For convenience we also support `--trace=memory_light` which omits call stacks. This change also introduces multiple memory allocators, which may be selected via command-line option `--malloc=<allocator>`: * `mimalloc` - mimalloc (default, same as before) * `rpmalloc` - rpmalloc is another high performance allocator for multithreaded applications which may be a better option than mimalloc (to be evaluated). Due to toolchain limitations this is currently only supported on Windows. * `stomp` - an allocator intended to be used during development/debugging to help track down memory issues such as use-after-free or out-of-bounds access. Currently only supported on Windows. * `ansi` - fallback to default system allocator
* safer path from handle (#195)Dan Engelbrecht2024-10-161-7/+10
| | | * remove PathFromHandle that throws to give better context on failures
* clean cache slog files on startup (#143)Dan Engelbrecht2024-09-041-0/+7
| | | | - Bugfix: If we fail to move a temporary file into place, try to re-open the file so we clean it up - Improvement: Clean up cache bucket log files at startup as we store the matching information in the index snapshot for the bucket
* meta info store (#75)Dan Engelbrecht2024-08-301-9/+16
| | | | - Feature: Added option `--gc-cache-attachment-store` which caches referenced attachments in cache records on disk for faster GC - default is `false` - Feature: Added option `--gc-projectstore-attachment-store` which caches referenced attachments in project store oplogs on disk for faster GC - default is `false`
* adds more information in log when oplog rename/delete fails (#117)Dan Engelbrecht2024-08-151-0/+4
| | | | | | * adds more information in log when oplog rename/delete fails * warn if we fail to delete dropped directory * close oplog storage file inside try/catch * don't try to flush closed files
* use write and move in place for safer writing of files (#70)Dan Engelbrecht2024-05-021-0/+20
| | | * use write and move in place for safer writing of files
* special treatment large oplog attachments v2 (#5)Dan Engelbrecht2024-03-141-2/+10
| | | | | - Bugfix: Install Ctrl+C handler earlier when doing `zen oplog-export` and `zen oplog-export` to properly cancel jobs - Improvement: Add ability to block a set of CAS entries from GC in project store - Improvement: Large attachments and loose files are now split into smaller chunks and stored in blocks during oplog export
* exception on basicfile read error (#642)Dan Engelbrecht2024-01-291-8/+28
| | | | | * Change BasicFile::Read to throw exception like IoBuffer - Don't ASSERT on dwNumberOfBytesRead == NumberOfBytesToRead - throw exception with details instead - Use proper return type for pread()
* make sure to advance read buffer pointer in BasicFileWriter::Write (#633)Dan Engelbrecht2024-01-221-1/+3
|
* Make sure that PathFromHandle don't hide true error when throwing exceptions ↵Dan Engelbrecht2023-12-111-9/+23
| | | | | | | | | (#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-10/+84
| | | | | 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
* New rotating file logger that keeps on running regardless of errors (#495)Dan Engelbrecht2023-10-251-1/+33
| | | * New rotating file logger that keeps on running regardless of errors
* faster oplog iteration (#471)Dan Engelbrecht2023-10-131-0/+16
| | | | | * use a CbObjectView instead of CbObject to avoid creating IOBufferCore instances * use BasicFileBuffer directly where possible * changelog
* Make sure error logging or destructors don't throw exception when trying to ↵Dan Engelbrecht2023-09-121-2/+6
| | | | | 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
* retry file create (#383)Dan Engelbrecht2023-09-041-0/+16
| | | | | * add retry logic when creating files * only write disk usage log if disk writes are allowed * changelog
* buffered file reading for oplog (#366)Dan Engelbrecht2023-08-211-0/+194
| | | | | * add BasicFileBuffer for buffered read of BasicFile * Use BasicFileBuffer when reading oplog * changelog
* * added file sharing control to BasicFile (required to implement lockfiles)Stefan Boberg2023-06-301-13/+42
| | | | | * added delete-on-close support to BasicFile * added BasicFile::ReadRange()
* BasicFile::ReadAll should handle zero-sized files gracefullyStefan Boberg2023-05-251-3/+10
|
* moved source directories into `/src` (#264)Stefan Boberg2023-05-021-0/+575
* moved source directories into `/src` * updated bundle.lua for new `src` path * moved some docs, icon * removed old test trees