aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/include
Commit message (Collapse)AuthorAgeFilesLines
...
| * moved process handling code into separate h/cpp (#555)Stefan Boberg2023-11-202-80/+94
| |
| * fix named event (#553)Dan Engelbrecht2023-11-171-11/+13
| | | | | | * fix named event timout and test, fix blocking queue
| * blocking queue fix (#550)Dan Engelbrecht2023-11-161-12/+10
| | | | | | | | | | | | | | | | | | * make BlockingQueue::m_CompleteAdding non-atomic * ZenCacheDiskLayer::Flush logging * name worker threads in ZenCacheDiskLayer::DiscoverBuckets * name worker threads in gcv2 * improved logging in ZenServerInstance * scrub threadpool naming * remove waitpid handling, we should just call wait to kill zombie processes
| * add zenserver state snapshot support (#543)Stefan Boberg2023-11-161-1/+1
| | | | | | | | | | 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.
| * changed posix event implementation to use std::atomic instead of volatile (#547)Stefan Boberg2023-11-161-1/+3
| |
| * Make object store endpoint S3 compatible. (#535)Per Larsson2023-11-151-0/+3
| | | | | | | | | | * Make object store endpoint S3 compatible. * Removed XML pretty printing and set object store endpoint disabled by default.
* | removed unnecessary SHA1 referencesStefan Boberg2023-12-112-2/+0
|/
* gc history log (#519)Dan Engelbrecht2023-11-132-0/+9
| | | | | - 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)
* fmt compilation fix for fmt v10+new vs build (#529)Stefan Boberg2023-11-131-8/+15
| | | VS 17.7.6 triggers some new compilation errors with certain versions of fmt::make_format_args. This should fix those errors. I don't fully understand why this is necessary, sadly my c++-fu is not strong enough.
* factored out some compiler definitions etc into zenbase (#517)Stefan Boberg2023-11-0713-574/+40
| | | | | this is a header-only library which mostly contains definitions to support different platforms and compilers. It is part of the zen codebase but is intended to be consumable separately to zenbase etc to support standalone transport plug-ins and similar.
* spdlog implementation hiding (#498)Stefan Boberg2023-11-065-142/+270
| | | | | | | | | this change aims to hide logging internals from client code, in order to make it easier to extend and take more control over the logging process in the future. As a bonus side effect, the generated code is much tighter (net delta around 2.5% on the resulting executable which includes lots of thirdparty code) and should take less time to compile and link. Client usage via macros is pretty much unchanged. The main exposure client code had to spdlog internals before was the use of custom loggers per subsystem, where it would be common to have `spdlog::logger` references to keep a reference to a logger within a class. This is now replaced by `zen::LoggerRef` which currently simply encapsulates an actual `spdlog::logger` instance, but this is intended to be an implementation detail which will change in the future. The way the change works is that we now handle any formatting of log messages in the zencore logging subsystem instead of relying on `spdlog` to manage this. We use the `fmt` library to do the formatting which means the client usage is identical to using `spdlog`. The formatted message is then forwarded onto any sinks etc which are still implememted via `spdlog`.
* gc v2 tests (#512)Dan Engelbrecht2023-11-061-1/+8
| | | | | | | | | | * set MaxBlockCount at init * properly calculate total size * basic blockstore compact blocks test * correct detection of block swap * Use one implementation for CreateRandomBlob * reduce some data sets to increase speed of tests * reduce test time * rename BlockStoreCompactState::AddBlock -> BlockStoreCompactState::IncludeBlock
* keep a "null" iobuffer core to reduce redundant memory allocations (#507)Dan Engelbrecht2023-11-061-1/+5
|
* only measure a variable integer once where we can (#500)Dan Engelbrecht2023-10-251-5/+17
|
* eliminate redundant logging code (#499)Stefan Boberg2023-10-251-1/+10
| | | | | | | | | zenutil and zenserver both contain very similar logging setup code and this change aims to make them have most code in common. * fullformatter/jsonformatter/RotatingFileSink are moved into dedicated header files in zenutil * zenserver `InitializeLogging`/`ShutdownLogging` are renamed `InitializeServerLogging`/`InitializeServerLogging` * these now call into the common zenutil `BeginInitializeLogging`/`FinishInitializeLogging` in addition to setting up server custom logging * `std::filesystem::path` is now logged after stripping any `\\\\?\\` prefix for readability
* statsd metrics reporting (#496)Stefan Boberg2023-10-251-0/+1
| | | | | added support for reporting metrics via statsd style UDP messaging, which is supported by many monitoring solution providers this change adds reporting only of three cache related metrics (hit/miss/put) but this should be extended to include more metrics after additional evaluation
* typedef for std streaming to StringBuilderStefan Boberg2023-10-201-0/+2
|
* explicit ChunkingLinearAllocatorStefan Boberg2023-10-201-1/+1
|
* Cache (rpc) activitity recording improvements (#482)Stefan Boberg2023-10-201-1/+1
| | | | | | | this adds a new RPC recording path aimed at more continuous recording and analysis of recorded sessions the new strategy is implemented alongside the original in order to retain the ability to read the older format the main difference between v2 and v1 is that the new strategy splits the recording into segments which are independent from each other. This is done to enable long running sessions with automatic disk cleanup (not implemented yet), appending to an existing recording (not implemented) and/or partial analysis and processing. The recorder will start a new segment when some criteria is fulfilled, including the number of files in the segment directory, disk footprint etc
* added explicit implementation of IoHash equals operator (#464)Stefan Boberg2023-10-111-0/+2
| | | | | | | | | * added explicit implementation of IoHash equals and less than operator using memcpy This improves codegen on MSVC in particular. Without this the operator is not inlined and consists of 20 individual (not in a loop) byte-by-byte comparisons each with an associated branch. With this change we get three comparisons (two uint64, one uint32) and three branches. So less pressure on branch predictors and as the code gets inlined the predictor should hopefully also function better.
* minor fixes to zencore (#457)Stefan Boberg2023-10-091-1/+1
| | | | * AssertException constructor should be explicit * removed pragma comment
* reject known bad bucket names in structured cache (#452)v0.2.27-pre0Stefan Boberg2023-10-061-0/+13
| | | | | | | * added string_view helpers for ParseHexBytes/ParseHexNumber * reject known bad buckets in structured cache put handler (32-character hex bucket names are rejected) * also added bucket rejection logic to bucket discovery * added rejected_writes stat to HttpStructuredCache
* fixed issue where IoBufferBuilder::ReadFromFileMaybe loses content type (#450)Stefan Boberg2023-10-051-1/+1
|
* added --quiet option to suppress default logging to stdout (#446)Stefan Boberg2023-10-041-0/+1
| | | | added --quiet option for zenserver to suppress default logging to stdout
* refactor comapactcas index (#443)Dan Engelbrecht2023-10-041-0/+1
| | | | | - Bugfix: Fix scrub messing up payload and access time in disk cache bucket when compacting index - Improvement: Split up disk cache bucket index into hash lookup and payload array to improve performance - Improvement: Reserve space up front for compact binary output when saving cache bucket manifest to improve performance
* Handle OOM and OOD more gracefully to not spam Sentry with error reports (#434)Dan Engelbrecht2023-10-021-0/+3
| | | | | | - Improvement: Catch Out Of Memory and Out Of Disk exceptions and report back to reqeuster without reporting an error to Sentry - Improvement: If creating bucket fails when storing and item in the structured cache, log a warning and propagate error to requester without reporting an error to Sentry - Improvement: Make an explicit flush of the active block written to in blockstore flush - Improvement: Make sure cache and cas MakeIndexSnapshot does not throw exception on failure which would cause and abnormal termniation at exit
* adding more stats (#429)Dan Engelbrecht2023-09-281-3/+61
| | | | | - Feature: Add detailed stats on requests and data sizes on a per-bucket level, use parameter `cachestorestats=true` on the `/stats/z$` endpoint to enable - Feature: Add detailed stats on requests and data sizes on cidstore, use parameter `cidstorestats=true` on the `/stats/z$` endpoint to enable - Feature: Dashboard now accepts parameters in the URL which is passed on to the `/stats/z$` endpoint
* add trace command to enable/disable tracing at runtime (#416)Dan Engelbrecht2023-09-221-1/+4
| | | | | * add trace command to enable/disable tracing at runtime * rework tracing init/start/stop * changelog
* Improvement: Add names to background jobs for easier debugging (#412)Dan Engelbrecht2023-09-201-11/+11
| | | | Improvement: Background jobs now temporarily sets thread name to background job name while executing Improvement: Background jobs tracks worker thread id used while executing
* VFS implementation for local storage service (#396)Stefan Boberg2023-09-201-0/+8
| | | currently, only Windows (using Projected File System) is supported
* job queue and async oplog-import/export (#395)Dan Engelbrecht2023-09-131-0/+84
| | | | | | | | | | | | | | | | - Feature: New http endpoint for background jobs `/admin/jobs/status` which will return a response listing the currently active background jobs and their status - Feature: New http endpoint for background jobs information `/admin/jobs/status/{jobid}` which will return a response detailing status, pending messages and progress status - GET will return a response detailing status, pending messages and progress status - DELETE will mark the job for cancelling and return without waiting for completion - If status returned is "Complete" or "Aborted" the jobid will be removed from the server and can not be queried again - Feature: New zen command `jobs` to list, get info about and cancel background jobs - If no options are given it will display a list of active background jobs - `--jobid` accepts an id (returned from for example `oplog-export` with `--async`) and will return a response detailing status, pending messages and progress status for that job - `--cancel` can be added when `--jobid` is given which will request zenserver to cancel the background job - Feature: oplog import and export http rpc requests are now async operations that will run in the background - Feature: `oplog-export` and `oplog-import` now reports progress to the console as work progress by default - Feature: `oplog-export` and `oplog-import` can now be cancelled using Ctrl+C - Feature: `oplog-export` and `oplog-import` has a new option `--async` which will only trigger the work and report a background job id back
* Hash utility functions (#385)Stefan Boberg2023-09-133-0/+51
| | | | * added std::hash implementation for Guid and Oid types * Added CombineHashes implementation
* ZenCacheStore is now reference counted (#398)Stefan Boberg2023-09-131-0/+1
| | | this change also adds a GetNamespaces function which may be used to enumerate all currently known cache namespaces
* Make sure error logging or destructors don't throw exception when trying to ↵Dan Engelbrecht2023-09-121-0/+4
| | | | | 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/+1
| | | * extend http client with configuration, headers, parameters and disk streaming upload/download
* stream oplog attachments from jupiter (#384)Dan Engelbrecht2023-09-061-6/+6
| | | | | | | | | | * 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
* fix trace close (#365)Dan Engelbrecht2023-08-211-0/+1
| | | * Make sure we close our trace session properly
* update vcpkg dependencies (#356)Dan Engelbrecht2023-08-112-1/+42
| | | | | | * bump vcpkg version * fmt lib 10 fixes * xmake dependencies (with linux workarounds) * changelog
* Make sure we always write "data" attachment hash for snapshotted oplog ↵Dan Engelbrecht2023-08-111-5/+9
| | | | | | | | | entries (#355) * Make sure we always write "data" attachment hash for snapshotted oplog entries * Make sure to add chunk mappings for files moved to attatchment in snapshot operation * fix inverted timoute for expiration (we don't want time expiry in these cases) * increase timeout for jupiter oplog in project to 3 min * changelog
* * Added Guid::FromStringStefan Boberg2023-06-3013-21/+138
| | | | | | | * 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)
* MakeCloneFromMemory should handle zero sized buffers gracefullyStefan Boberg2023-06-161-2/+9
| | | | we don't currently permit creating zero-length IoBuffer instances to prevent inefficiencies, but this can cause issues since some higher level code now ends up using it for things it was not originally intended for.
* added GetProcessIdStefan Boberg2023-06-161-0/+1
| | | | this enables mapping the result of a CreateProc call to an integer pid
* oplog snapshot (#317)Stefan Boberg2023-05-251-0/+42
| | | | | Added "snapshot" oplog RPC this may be used to bring referenced files into the local store instead of referencing them by filename, thus making the project/oplog transportable
* block destructors from throwing exceptions (#321)Dan Engelbrecht2023-05-241-2/+2
| | | | | | * ~FileMapping() is not allowed to throw exceptions * ~ScopedActivityBase() should not call ZEN_ASSERT (which causes SIGABORT on error) * ProjectStore::Project::WriteAccessTimes() which is called from ProjectStore::~Project() must not throw exceptions * changelog
* use exception when allocations fail rather than asserts (#319)Dan Engelbrecht2023-05-231-1/+4
| | | | * use exception when allocations fail rather than asserts * changelog
* streaming decompression support (#142)Stefan Boberg2023-05-235-4/+185
| | | Added CompressedBufferReader support from UE. This provides some streaming decompression support which can be employed to reduce memory and other resource usage.
* MemoryView::RightChop -> constStefan Boberg2023-05-221-1/+1
|
* added benchmark utility command `bench` (#298)Stefan Boberg2023-05-161-0/+1
| | | currently this implements a way (`zen bench --purge`) to purge the standby lists on Windows. This basically flushes the file system cache and is useful to put your system in a consistent state before running benchmarks
* Moved EnableVTMode function into zencore (#311)Stefan Boberg2023-05-161-12/+6
|
* brought over minor IoBuffer changes from sb/scrubStefan Boberg2023-05-151-0/+2
| | | | no actual code changes, just comments