aboutsummaryrefslogtreecommitdiff
path: root/zencore
Commit message (Collapse)AuthorAgeFilesLines
* moved source directories into `/src` (#264)Stefan Boberg2023-05-0283-25031/+0
| | | | | | * moved source directories into `/src` * updated bundle.lua for new `src` path * moved some docs, icon * removed old test trees
* add customization of assert implementation (#263)Dan Engelbrecht2023-04-282-27/+86
| | | * add customization of assert implementation
* Write log error and flush log before reporting error to Sentry/error loggerDan Engelbrecht2023-04-271-1/+1
|
* made Ref<> constructor explicit (#262)Stefan Boberg2023-04-272-3/+3
| | | This change makes the Ref<> constructor explicit, which can help avoid unnecessary overheads and other accidents
* bugfixes (#261)Dan Engelbrecht2023-04-271-1/+11
| | | | | * Don't try to GC if now blocks to GC was found, regardless if we have locations in memory * Don't let exception leak from scope guard as throw in destructor will abort application * changelog
* 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
|
* fix sentry report callstack (#256)Dan Engelbrecht2023-04-253-9/+42
| | | | | | | * Include file, line and function in sentry log error messages * use sync direct error logger to get correct call stacks on error * changelog * use d1trimfile on windows to shorten file path on windows * constexpr -> consteval
* fixed dashboard file serving bug (#255)Stefan Boberg2023-04-242-7/+99
| | | | | a recent change which introduced support for specifying accept: implicitly via the file extension in the URI caused fallout in the dashboard which would fail to serve any content because the extension was stripped from the RelativeUri accessor. This change fixes that by retaining a copy of the Uri string view which includes the suffix additionally, in order to test this change with both asio/http.sys paths I made the path used for all tests configurable in zenserver-test which involved pulling in a change from sb/proto which makes testing configuration a bit more flexible
* added missing #pragma onceStefan Boberg2023-04-191-0/+2
| | | | required for unity builds to work properly
* clang-format fixStefan Boberg2023-04-181-1/+1
|
* fix gcc warning about potentially unitialized variableStefan Boberg2023-04-181-1/+1
|
* De/fix rpc replay to handle pid (#243)Dan Engelbrecht2023-03-211-1/+11
| | | | | | | * allow access to CbWriter::Save(MutableMemoryView Buffer) in CbObjectWriter to avoid extra memory allocation and copy * fix entry index counting in rpcreplay * adjust target pid in rpc requests for rpc replay * allow control in rpc-record-replay over how attachments are sent * changelog
* removed catch2 (#241)Stefan Boberg2023-03-072-15/+2
| | | removed catch2 since it's de facto not supported due to the lack of multithreading support
* Move knowledge of UE env variable from zenserver to zen command line tool (#227)Dan Engelbrecht2023-02-132-0/+25
| | | | * move knowledge of UE env variable from zenserver to zen command line tool * move env-fetching code to GetEnvVariable
* oplog upload/download (#214)Dan Engelbrecht2023-02-091-0/+9
| | | | | | | | | | | | - Feature: Zen server endpoint `prj/{project}/oplog/{log}/chunks` to post multiple attachments in one request. - Feature: Zen server endpoint `prj/{project}/oplog/{log}/save` to save an oplog container. Accepts `CbObject` containing a compressed oplog and attachment references organized in blocks. - Feature: Zen server endpoint `prj/{project}/oplog/{log}/load` to request an oplog container. Responds with an `CbObject` containing a compressed oplog and attachment references organized in blocks. - Feature: Zen server endpoint `{project}/oplog/{log}/rpc` to initiate an import to or export from an external location and other operations. Use either JSon or CbPackage as payload. - CbObject/JSon RPC format for `import` and `export` methods: - CbObject RPC format for `getchunks` method, returns CbPackage with the found chunks, if all chunks are found the number of attachments matches number of chunks requested. - Feature: Zen server `{project}/oplog/{log}/{hash}` now accepts `HttpVerb::kPost` as well as `HttpVerb::kGet`. - Feature: Zen command line tool `oplog-export` to export an oplog to an external target using the zenserver oplog export endpoint. - Feature: Zen command line tool `oplog-import` to import an oplog from an external source using the zenserver oplog import endpoint.
* Removed stale comment now that use of !! has been replacedMartin Ridgers2023-02-031-1/+0
|
* Added a size_t override for Apple Clang where types as size_t != uint64_tMartin Ridgers2023-02-031-0/+11
|
* Removed size_t override that is no longer required with newer libc++Martin Ridgers2023-02-021-9/+0
|
* Removed unused add_link() callMartin Ridgers2023-02-021-1/+0
| | | | | The blake3 library is now provided by vcpkg and marked as a dependency via the add_package() call.
* Call gettid syscall directly as gettid() is not available in earlier glibcMartin Ridgers2023-02-021-1/+2
|
* Fix Clang warning about bitwise ops on boolean valuesMartin Ridgers2023-02-021-1/+1
|
* Changed so CompressedBuffer::DecodeRawHash returns IoHash just like on the ↵Stefan Boberg2022-12-122-3/+3
| | | | | | UE side (#208) removed all use of IoHash::FromBLAKE3() caused by interactions with CompressedBuffer APIs
* added [[fallthrough]] annotations to silence static analysisStefan Boberg2022-12-121-0/+20
|
* Path from handle perf improvement (#206)Dan Engelbrecht2022-12-081-2/+10
| | | | | | * Read recorded requests to memory before parsing This will more accurately simulate how requests comes in from a client * Make a fast path for GetFinalPathNameByHandleW Try to get the path with a fixes size buffer first to avoid always doing two calls to GetFinalPathNameByHandleW
* optimizations (#200)Dan Engelbrecht2022-12-078-93/+234
| | | | | | | | | | | | | * 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
* Cache request record/replay (#198)Dan Engelbrecht2022-12-072-6/+29
| | | | | | | | | This adds recording and playback of cache request with full data - both get and put operations can be replayed. Invoke via web request. `<host>/z$/exec$/start-recording?<disk-storage-path>` `<host>/z$/exec$/stop-recording` `<host>/z$/exec$/replay-recording?<thread-count>&<disk-storage-path>`
* Make sure we always store record/op before attachments (#195)Dan Engelbrecht2022-12-011-2/+33
| | | | | | | | * Make sure we always store record/op before attachments We don't want to store attachments first - a GC operation could then remove attachments if triggered before storing record/op * zen::Latch * Use latch to wait for attachments to be stored * use zen::latch when adding attachments from project oplog import * changelog
* Add `import-project` and `export-project` (#183)Dan Engelbrecht2022-11-189-113/+275
| | | * Add `import-project` and `export-project` command line parsing
* Support file reference in package message (#184)Dan Engelbrecht2022-11-072-28/+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
* De/reduce buffer creation in parsepackedmessage (#175)Dan Engelbrecht2022-09-301-0/+1
| | | | | * Don't create call CreateBuffer for attachement data that we only read and not keep * changelog * don't read oplog attachments into memory just to do a redundant store of them
* De/more upstream details (#168)v0.1.6-pre9v0.1.6-pre10Dan Engelbrecht2022-09-222-0/+8
| | | | | | * Pass along endpoint info for each upstream request * Add more timing details in log * more log details for single item upstream fetch * DISABLEDQUERY over SKIP
* logging - don't do formatting of messages the will not be logged (#169)Dan Engelbrecht2022-09-211-72/+40
|
* Use BLAKE3 port from vcpkg (#141)Stefan Boberg2022-09-202-22/+12
| | | | use BLAKE3 port from vcpkg instead of in-tree binaries
* LoadCompactBinary gracefully handles read failures and sizes larger than the ↵Dan Engelbrecht2022-09-192-24/+70
| | | | | | | | archive (#165) * add failing test * CompactBinary: Fixed LoadCompactBinary to gracefully handle read failures and sizes larger than the archive From https://p4-swarm.epicgames.net/changes/21983905 * changelog
* enable json log file (#164)Dan Engelbrecht2022-09-121-10/+10
| | | | | | * Include source location on ZEN_ERROR and ZEN_CRITICAL * Use proper logging for sentry init status * format file logger as json if .json extension is given * changelog
* Use "\\?\" prefixed paths and fix hardcoded path delimiters (#149)Dan Engelbrecht2022-08-261-1/+6
| | | | | | * use "\\?\" prefix for windows paths * fix path delimiters * disable vcpkg caching * Workaround for spdlog not being able to create directories prefixed with `\\?\`
* added suppression of warning C4189 to work around problems in fmtStefan Boberg2022-07-211-5/+6
|
* add macos builds (#133)Dan Engelbrecht2022-06-241-0/+1
| | | | | | | * add macos builds * bump timeout to 15 minutes and add timeout to create-release flow * strip -pre suffix from version when running config * fix pre-release check * bump version
* merged from mainStefan Boberg2022-06-162-0/+6
|
* added _WIN32_WINNT define to be consistent with xmake fileStefan Boberg2022-06-131-0/+3
|
* namespace/bucket validation now uses AsciiSet for more efficient validation ↵Stefan Boberg2022-06-101-1/+1
| | | | (#127)
* core: added ReadStdInStefan Boberg2022-06-102-0/+21
| | | | implements a simple wrapper around reading stdin until EOF
* added IoBuffer::MutableData()Stefan Boberg2022-06-101-0/+6
|
* 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-282-0/+46
| | | | | | | | 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.
* Add catch2 support (#101)Stefan Boberg2022-05-207-40/+71
| | | | | | | Added option to use catch2 for unit tests Currently both doctest and catch2 are supported via some compatibility macros. doctest is the default, and ZEN_USE_CATCH2 needs to be defined to switch to catch2. Our goal is to evaluate how well catch2 works and switch to catch2 if everything pans out since UE5 now supports using catch2 for unit tests.
* use string::compare in caseSensitiveCompareStringsDan Engelbrecht2022-05-121-9/+2
|