aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver
Commit message (Collapse)AuthorAgeFilesLines
...
* fix block cloning copy argument validation (#560)Stefan Boberg2023-11-221-0/+1
|
* reduce work when there are no blocks to compact (#558)Dan Engelbrecht2023-11-221-54/+61
| | | | * reduce work when there are no blocks to compact * fix lock scopes
* add command line options for compact block threshold and gc verbose (#557)Dan Engelbrecht2023-11-216-7/+81
| | | | | | | | | | | - Feature: Added new options to zenserver for GC V2 - `--gc-compactblock-threshold` GCV2 - how much of a compact block should be used to skip compacting the block, default is 90% - `--gc-verbose` GCV2 - enable more verbose output when running a GC pass - Feature: Added new options to `zen gc` command for GC V2 - `--compactblockthreshold` GCV2 - how much of a compact block should be used to skip compacting the block, default is 90% - `--verbose` GCV2 - enable more verbose output when running a GC pass - Feature: Added new parameters for endpoint `admin/gc` (PUT) - `compactblockthreshold` GCV2 - how much of a compact block should be used to skip compacting the block, default is 90% - `verbose` GCV2 - enable more verbose output when running a GC pass
* compact separate for gc referencer (#533)Dan Engelbrecht2023-11-216-360/+568
| | | | | - Refactor GCV2 so GcReferencer::RemoveExpiredData returns a store compactor, moving out the actual disk work from deleting items in the index. - Refactor GCV2 GcResult to reuse GcCompactStoreStats and GcStats - Make Compacting of stores non-parallell to not eat all the disk I/O when running GC
* Added HTTP verb HEAD to objstore get-object. (#554)Per Larsson2023-11-201-1/+1
| | | | | | | * Added HTTP verb HEAD to objstroe get-object. * Added HTTP verb HEAD to objstore get-object. * Removed HEAD request exception for list-object.
* blocking queue fix (#550)Dan Engelbrecht2023-11-162-16/+29
| | | | | | | | | * 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 wipe prevention via file in data root dir (#548)Dan Engelbrecht2023-11-161-3/+18
| | | * if a file named root_manifest.ignore_schema_mismatch exists in the root data dir, ignore schema mismatch
* add zenserver state snapshot support (#543)Stefan Boberg2023-11-163-1/+21
| | | | | 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.
* Trim any leading slash and backslash from bucket prefix. (#541)Per Larsson2023-11-151-0/+2
|
* remove dependency on cxxopts exception types (#542)Stefan Boberg2023-11-151-10/+13
| | | | | | changed options parsing so that we don't depend on cxxopts exception types this makes it possible to use any cxxopts-version including beyond 3.0.0
* Make object store endpoint S3 compatible. (#535)Per Larsson2023-11-153-46/+415
| | | | | * Make object store endpoint S3 compatible. * Removed XML pretty printing and set object store endpoint disabled by default.
* fix race contdition when signaling shutdown of process and waiting for ↵Dan Engelbrecht2023-11-152-4/+6
| | | | completion (#539)
* add host name to sentry (#537)Dan Engelbrecht2023-11-152-7/+51
| | | * add hostname to sentry user id
* fix comparison operator for cache disk location (#534)Dan Engelbrecht2023-11-141-1/+12
| | | * proper != operator for DiskLocation
* fix index out of bounds in CacheBucket::CompactState (#532)Dan Engelbrecht2023-11-141-25/+24
| | | | | * use PayloadIndex for indexing into payload array * naming cleanup * fix metadata index in CacheBucket::CompactState
* fix potential logic error in bucket manifest readStefan Boberg2023-11-131-17/+21
|
* gc history log (#519)Dan Engelbrecht2023-11-131-97/+4
| | | | | - 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)
* package dependency clean-ups (#531)Stefan Boberg2023-11-131-1/+0
| | | | | | | | | | this change just cleans up dependency declarations in xmake.lua files, discovered while exploring a more to xrepo which catches dependency problems since it will not just place all includes in a single directory, unlike vcpkg. * removed spurious asio dependency from zenserver-test * removed rocksdb reference * add missing asio package dependency * removed catch2 reference (no longer available) * added explicit cpr reference * made some zencore package dependencies public (this is necessary because some public zencore headers pull in package headers. If you use a more strict package manager than vcpkg then you get compilation errors whenever these includes are pulled in unless you declare the dependency explicitly)
* fix bad access to unlocked state (#527)Dan Engelbrecht2023-11-102-17/+26
| | | | * don't touch non-locked data when creating manifest * safety assert for test dir
* reduce memory footprint for bucket indexes (#526)Stefan Boberg2023-11-101-14/+14
| | | reduces memory footprint of cache index by 10% or so by limiting the maximum number of entries in a bucket to 2^32 (was 2^64)
* option for zenserver - `--http-forceloopback` (#516)Dan Engelbrecht2023-11-091-0/+12
| | | | * New option for zenserver - `--http-forceloopback` which forces opening of the server http server using loopback (local) connection (UE-199776) * add fallback to local connection for asio if we get access denied on public port
* reduce number of files generated on shared instances (#524)Stefan Boberg2023-11-092-1/+8
|
* disk layer gc and error/warnings cleanup (#515)Dan Engelbrecht2023-11-083-77/+126
| | | | | | | - Improvement: Use GC reserve when writing index/manifest for a disk cache bucket when disk is low when available - Improvement: Demote errors to warning for issues that are not critical and we handle gracefully - Improvement: Treat more out of memory errors from windows as Out Of Memory errors Fixed wrong sizeof() statement for compactcas index (luckily the two structs are of same size)
* changed logic around sponsor process monitoring (#522)Stefan Boberg2023-11-081-1/+1
| | | with this change, any sponsor is registered synchronously at startup, instead of one second after.
* Don't put cache entries into the memory cache on Put, only on Get (#518)Dan Engelbrecht2023-11-072-21/+24
|
* factored out some compiler definitions etc into zenbase (#517)Stefan Boberg2023-11-073-3/+3
| | | | | 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-0616-63/+71
| | | | | | | | | 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-063-66/+11
| | | | | | | | | | * 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
* statsd for cas (#511)Dan Engelbrecht2023-11-064-9/+5
| | | | * separate statsd interfaces so they can be accessible to zenstore * statsd for cas
* reduce cachebucket mem (#509)Dan Engelbrecht2023-11-062-293/+448
| | | | | | | * reduce memory footprint for disk cache separate dense arrays for rawhash+rawsize and memcache buffer * don't write RawHash/RawSize for buckets with no such metadata * helper functions * make index into metadata and cached payload type safe * helper functions for memcached
* multithread cache bucket (#508)Dan Engelbrecht2023-11-061-21/+66
| | | | * Multithread init and flush of cache bucket * tweaked threading cound for bucket discovery, disklayer flush and gc v2
* individual gc stats (#506)Dan Engelbrecht2023-10-306-196/+402
| | | | | - Feature: New parameter for endpoint `admin/gc` (GET) `details=true` which gives details stats on GC operation when using GC V2 - Feature: New options for zen command `gc-status` - `--details` that enables the detailed output from the last GC operation when using GC V2
* New GC implementation (#459)Dan Engelbrecht2023-10-3010-110/+1535
| | | - Feature: New garbage collection implementation, still in evaluation mode. Enabled by `--gc-v2` command line option
* added missing includes (#504)Stefan Boberg2023-10-274-0/+5
| | | | | this change adds some includes to files which "inherit" includes from elsewhere this was exposed on another branch when removing some heavy dependencies from central headers
* fixed missing context for cache record PUT operations (#503)Stefan Boberg2023-10-271-2/+6
|
* fix CacheBucket::CollectGarbage removing standalone entries without an ↵Dan Engelbrecht2023-10-271-4/+7
| | | | exclusive lock (#502)
* block sending error reports from sentry_sink to Sentry unless the log is ↵Dan Engelbrecht2023-10-271-0/+4
| | | | actually an error log (#501)
* eliminate redundant logging code (#499)Stefan Boberg2023-10-253-723/+35
| | | | | | | | | 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-259-14/+194
| | | | | 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
* New rotating file logger that keeps on running regardless of errors (#495)Dan Engelbrecht2023-10-251-13/+272
| | | * New rotating file logger that keeps on running regardless of errors
* removed HttpCidStore (#497)Stefan Boberg2023-10-244-165/+0
|
* merge disk and memory layers (#493)Dan Engelbrecht2023-10-2411-1134/+809
| | | | - Feature: Added `--cache-memlayer-sizethreshold` option to zenserver to control at which size cache entries get cached in memory - Changed: Merged cache memory layer with cache disk layer to reduce memory and cpu overhead
* fix m_LastFullGcDuration, m_LastFullGCDiff, m_LastFullGcDuration and ↵Dan Engelbrecht2023-10-231-2/+2
| | | | m_LastLightweightGcDuration stats (#494)
* Remove any unreferenced blocks in block store on open (#492)Dan Engelbrecht2023-10-232-9/+4
| | | * Remove any unreferenced blocks in block store on open
* Filter expired cache entries against ExpiredKeys - not CAS entries to retain ↵Dan Engelbrecht2023-10-231-40/+23
| | | | (#491)
* Don't prune block locations due to missing blocks a startup (#487)Dan Engelbrecht2023-10-202-57/+11
| | | | | | * Don't prune block locations due to missing blocks a startup This makes the behaviour consistent with FileCas - you can have an index that is not fully backed by data. Asking for a location that is not backed by data results in getting an empty result back Also, don't try to GC blocks that are unknown to the block store at the time of snapshot (to avoid removing data that comes in after GatherReferences in GC)
* Cache (rpc) activitity recording improvements (#482)Stefan Boberg2023-10-202-9/+23
| | | | | | | 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
* clean up GcContributor and GcStorage to be pure interfaces (#485)Dan Engelbrecht2023-10-204-5/+14
|
* Add --skip-delete option to gc command (#484)Dan Engelbrecht2023-10-202-1/+6
| | | | - Feature: Add `--skip-delete` option to gc command - Bugfix: Fix implementation when claiming GC reserve during GC
* add `flush` command and more gc status info (#483)Dan Engelbrecht2023-10-187-36/+130
| | | | | | - Feature: New endpoint `/admin/flush ` to flush all storage - CAS, Cache and ProjectStore - Feature: New command `zen flush` to flush all storage - CAS, Cache and ProjectStore - Improved: Command `zen gc-status` now gives details about storage, when last GC occured, how long until next GC etc - Changed: Cache access and write log are disabled by default