aboutsummaryrefslogtreecommitdiff
path: root/src/zencore
Commit message (Collapse)AuthorAgeFilesLines
* error fix in ReadFileRangede/httpclient-send-refactorDan Engelbrecht2024-04-261-2/+3
|
* add generic read file streaming in http clientDan Engelbrecht2024-04-262-17/+40
|
* use direct file access for large file hash (#63)Dan Engelbrecht2024-04-269-55/+126
| | | - Improvement: Refactor `IoHash::HashBuffer` and `BLAKE3::HashBuffer` to not use memory mapped files. Performs better and saves ~10% of oplog export time on CI
* zenserverprocess hardening (#61)Dan Engelbrecht2024-04-251-0/+3
| | | | * verify running process before creating event * make sure we don't signal/wait for a zenserver instance that we did not wait for to get ready
* import oplog improvements (#54)Dan Engelbrecht2024-04-201-1/+17
| | | | | | | | | | | * report down/up transfer speed during progress * add disk buffering in http client * offload block decoding and chunk writing form network worker pool threads add block hash verification for blocks recevied at oplog import * separate download-latch from write-latch to get more accurate download speed * check headers when downloading with http client to go directly to file writing for large payloads * we must clear write callback even if we only provide it as an argument to the Download() call * make timeout optional in AddSponsorProcess * check return codes when creating windows threadpool
* capture zenserver output on error (#51)Dan Engelbrecht2024-04-182-3/+9
| | | | * capture spawned server output and output on launch error * fix logging and launch validation in tests
* improved lock file handling (#50)Dan Engelbrecht2024-04-183-35/+95
| | | | | | | | | | | | - Feature: `zen down` - --`data-dir` to specify a data directory to deduce which zen instance to bring down - Feature: `zen attach` - --`data-dir` to specify a data directory to deduce which zen instance to attach to222 - Feature: `zen status` - --`port` filter running zen instances based on port - --`data-dir` filter running zen instances based on information in the data directory - Improvement: Trying to load a compact binary object from an empty file no longer causes access violation
* zen startup hardening (#49)Dan Engelbrecht2024-04-172-17/+245
| | | | | | | | | | | | | - Feature: `zen up` command improvements - --`port` allows you to specify a base port when starting an instance - --`base-dir` allows you to specify a base directory for the zenserver executable if it is not located next to the zen.exe executable - Feature: `zen down` - --`port` allows you to specify a base port when shutting down an instance - --`base-dir` allows you to specify a base directory for the zenserver executable if it is not located next to the zen.exe executable - --`force` if regular shutdown fails it tries to find a running zenserver.exe process and terminate it - If it fails to attach to the running server it now waits for it to exit when setting the RequestExit shared memory flag - Improvement: zenserver now checks the RequestExit flag in the shared memory and exist gracefully if it is set - Improvement: When adding a sponsor process to a running zenserver instance, we wait for it to be picked up from the shared memory section to determine success/fail
* Validate input buffer size when trying to parse package message (#47)Dan Engelbrecht2024-04-131-1/+12
| | | | * add validation of input buffer size when trying to parse package message * avoid doing memcopy when parsing package message
* remote project store stats (#44)Dan Engelbrecht2024-04-101-0/+17
| | | | | * add remote oplog store statistics * block chunking when uploading oplog to zenserver (mirroring) * make sure we can move temporary dechunked file into cas store
* improved assert (#37)Dan Engelbrecht2024-04-049-31/+427
| | | | - 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
* compressed header reading opt (#33)Dan Engelbrecht2024-04-031-52/+86
| | | * refactor so we don't have to re-read data from source to get block sizes
* Faster reading of compressed buffer headers by not materializing entire ↵Dan Engelbrecht2024-03-281-22/+52
| | | | source buffer (#28)
* add yaml serialization support (#3)Stefan Boberg2024-03-266-783/+1191
| | | | | | | this change adds serialization of payloads as YAML, but not parsing. The implementation is somewhat based on the JSON path, and may be collapsed eventually as it is possible to serialize JSON format using the same code it also separates out the JSON serialization into a separate file for ease of maintenance any HTTP request response may be formatted as yaml by using a `.yaml` suffix or an `Accept: text/yaml` header
* add a limit to the number of times we attempt to finalize (#22)Dan Engelbrecht2024-03-251-1/+0
| | | | | | - Improvement: Add limit to the number of times we attempt to finalize and exported oplog - Improvement: Switch to large thread pool when executing oplog export/import - Improvement: Clean up reporting of missing attachments in oplog export/import - Improvement: Remove double-reporting of abort reason for oplog export/import
* harden attach sponsor process (#14)Dan Engelbrecht2024-03-213-11/+26
| | | | | - Improvement: Delay exiting due to no sponsor processes by one second to handle race conditions - Improvement: Safer IsProcessRunning check - Improvement: make sure we can RequestApplicationExit safely from any thread
* improved process monitoring behaviour with invalid pids (#16)Stefan Boberg2024-03-212-11/+31
|
* non memory copy compressed range (#13)Dan Engelbrecht2024-03-202-0/+224
| | | | | * Add CompressedBuffer::GetRange that references source data rather than make a memory copy * Use Compressed.CopyRange in project store GetChunkRange * docs for CompressedBuffer::CopyRange and CompressedBuffer::GetRange
* special treatment large oplog attachments v2 (#5)Dan Engelbrecht2024-03-145-22/+39
| | | | | - 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
* 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
* Add WriteMeasuredVarUInt to avoid measuring ints twice before writing (#665)Dan Engelbrecht2024-03-062-26/+53
| | | | Avoid double resize of buffer in CbWriter::SetName and CbWriter::AddBinary Add WriteMeasuredVarUInt to avoid measuring ints twice before writing
* improved block store logging and more gcv2 tests (#659)Dan Engelbrecht2024-02-271-0/+9
| | | | * improved gc/blockstore logging * more gcv2 tests
* hashing fixes (#657)Dan Engelbrecht2024-02-265-7/+94
| | | | | * move structuredcachestore tests to zenstore-test * Don't materialize entire files when hashing if it is a large files * rewrite CompositeBuffer::Mid to never materialize buffers
* Save compressed large attachments to temporary files on disk (#650)Dan Engelbrecht2024-02-121-6/+2
| | | | | | | | | * Save large compressed large attachments to temporary files on disk * bump oplog block max size up to 64Mb again * Make sure CompositeBuffer::AppendBuffers actually moves inputs when it should * removed parallell execution of fetching payload for block assembly it was not actually helping and added complexity * make sure we move/release payload buffers as soon as possible * make sure we don't read in full large attachments to memory when computing hash
* compress large attachments on demand (#647)Dan Engelbrecht2024-02-052-28/+11
| | | | | | | - Improvement: Speed up oplog export by fetching/compressing big attachments on demand - Improvement: Speed up oplog export by batch-fetcing small attachments - Improvement: Speed up oplog import by batching writes of oplog ops - Improvement: Tweak oplog export default block size and embed size limit - Improvement: Add more messaging and progress during oplog import/export
* changed RPC recording to MPSC setup (#638)Stefan Boberg2024-01-311-1/+1
| | | fixes rare race condition when using RPC recording for long periods of time
* exception on basicfile read error (#642)Dan Engelbrecht2024-01-291-2/+2
| | | | | * 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()
* oplog import/export improvements (#634)Dan Engelbrecht2024-01-231-2/+3
| | | | * improve feedback from oplog import/export * improve oplog save performance
* jobqueue - allow multiple threads to report progress/messages (#635)Dan Engelbrecht2024-01-222-6/+9
| | | jobqueue - add AbortReason and properly propagate error when running async command
* remove use of <random> in stats (#628)Stefan Boberg2024-01-102-6/+45
| | | | the previous implementation was quite slow due to use of mt and uniform_distribution.
* ensure we can build without trace (#619)Stefan Boberg2023-12-192-0/+5
| | | | `xmake config -zentrace=n` would previously not build cleanly
* various TSAN/ASAN/LeakAnalyzer fixes (#622)Stefan Boberg2023-12-194-9/+24
| | | | | | | | | * fix JobQueue test threading issue. The inner job queued with `QueueJob` would reference `I` from inside the captured closure which would subsequently disappear * made sure application exit is thread safe * don't try to access string data out of bounds * keep-alive flag is accessed from multiple threads * fix memory leaks in Zen upstream client code * TSAN fixes for Event
* fix leak in IoBuffer for manifested small chunk (#618)Stefan Boberg2023-12-191-2/+2
| | | | * fix leak in IoBuffer for manifested small chunk. previously it would null out the `m_DataPtr` member on every path from `IoBufferExtendedCore::~IoBufferExtendedCore()` but it only really makes sense to null it out when the buffer has been memory mapped
* implement cache recording segment split by age (#611)Stefan Boberg2023-12-142-5/+83
| | | - also fixes weird DateTime/TimeSpan comparison operator
* Make sure IoBuffer is a valid null-buffer after move operation (#610)Dan Engelbrecht2023-12-141-4/+13
|
* use mimalloc where available (#601)Stefan Boberg2023-12-121-15/+11
| | | enabling mimalloc path for `Memory::Alloc` and `Memory::Free`
* header only compressed buffers are valid (#604)Dan Engelbrecht2023-12-121-2/+2
| | | - Bugfix: Allow attachments that contains a raw size of zero
* Merge branch 'main' of https://github.com/EpicGames/zenStefan Boberg2023-12-1122-866/+1574
|\
| * 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
| * added details to trace initialization (#588)Stefan Boberg2023-12-112-7/+13
| | | | | | this adds information on program name and command line to trace initialization
| * improved scrubbing of oplogs and filecas (#596)Stefan Boberg2023-12-111-0/+13
| | | | | | | | | | | | - Improvement: Scrub command now validates compressed buffer hashes in filecas storage (used for large chunks) - Improvement: Added --dry, --no-gc and --no-cas options to zen scrub command - Improvement: Implemented oplog scrubbing (previously was a no-op) - Improvement: Implemented support for running scrubbint at startup with --scrub=<options>
| * multi-line logging improvements (#597)Stefan Boberg2023-12-111-0/+8
| | | | | | | | | | | | * added ZEN_SCOPED_WARN and implemented multi-line logging * changed so file log also uses `fullformatter` for consistency and to get the multi-line support across the board
| * SuppressConsoleLog now removes any existing console logger (#599)Stefan Boberg2023-12-111-0/+5
| | | | | | SuppressConsoleLog now removes any existing console logger to avoid exceptions in spdlog
| * logging configuration via command line options (#589)Stefan Boberg2023-12-062-0/+81
| | | | | | | | | | | | | | with these changes it is possible to configure loggers on the command line. For instance: `xmake run zenserver --log-trace=http_requests,http` will configure the system so that the `http_request` and `http` loggers are set to TRACE level
| * HTTP plugin request debug logging (#587)Stefan Boberg2023-12-052-0/+15
| | | | | | | | | | | | * added log level control/query to LoggerRef * added debug logging to http plugin implementation * added GetDebugName() to transport plugin interfaces * added debug name to log output
| * global thread worker pools (#577)Dan Engelbrecht2023-11-292-0/+4
| | | | | | - Improvement: Use two global worker thread pools instead of ad-hoc creation of worker pools
| * close thread pool + parallel CasImpl::Initialize (#576)Dan Engelbrecht2023-11-281-0/+1
| | | | | | | | * close thread pool at destruction * parallell casimpl::initialize
| * Don't call spdlog::drop_all, spdlog::shutdown will do that for us in a ↵Dan Engelbrecht2023-11-271-1/+0
| | | | | | | | controlled manner (#573)
| * optimized index snapshot reading/writing (#561)Stefan Boberg2023-11-273-2/+28
| | | | | | | | | | 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
| |