aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/cache/cachedisklayer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix CacheBucket::CollectGarbage removing standalone entries without an ↵Dan Engelbrecht2023-10-271-4/+7
| | | | exclusive lock (#502)
* merge disk and memory layers (#493)Dan Engelbrecht2023-10-241-291/+535
| | | | - 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
* Remove any unreferenced blocks in block store on open (#492)Dan Engelbrecht2023-10-231-1/+1
| | | * 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-201-57/+3
| | | | | | * 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)
* Add --skip-delete option to gc command (#484)Dan Engelbrecht2023-10-201-1/+1
| | | | - Feature: Add `--skip-delete` option to gc command - Bugfix: Fix implementation when claiming GC reserve during GC
* minor - fix references size arrayDan Engelbrecht2023-10-171-0/+2
|
* don't call compact references if caching is not enabled (#478)Dan Engelbrecht2023-10-171-6/+12
|
* cache reference tracking (#455)Dan Engelbrecht2023-10-101-56/+387
| | | | | - Feature: Add caching of referenced CId content for structured cache records, this avoid disk thrashing when gathering references for GC - disabled by default, enable with `--cache-reference-cache-enabled` - Improvement: Faster collection of referenced CId content in project store
* reject known bad bucket names in structured cache (#452)v0.2.27-pre0Stefan Boberg2023-10-061-1/+32
| | | | | | | * 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
* Fix curruption of disk cache bucket index on GC (#448)Dan Engelbrecht2023-10-051-44/+51
| | | | | | | | | * make sure we hold the index lock when reading payload data in reclaim space * don't use index snapshot when updating index in reclaim space * check that things have not moved under our feet * don't touch m_Payloads without a lock * start write block index on the highest block index * we don't need to bump writeblockindex when stopping write to a block, we will bump appropriately when we start a new block * changelog
* reduce lock in disklayer (#447)Dan Engelbrecht2023-10-051-10/+22
| | | * Don't block all write access to all buckets when doing GatherReferences/CollectGarbage
* refactor comapactcas index (#443)Dan Engelbrecht2023-10-041-3/+10
| | | | | - 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
* faster accesstime save restore (#439)Dan Engelbrecht2023-10-031-93/+207
| | | | | | | | | | - Improvement: Reduce time a cache bucket is locked for write when flushing/garbage collecting - Change format for faster read/write and reduced size on disk - Don't lock index while writing manifest to disk - Skip garbage collect if we are currently in a Flush operation - BlockStore::Flush no longer terminates currently writing block - Garbage collect references to currently writing block but keep the block as new data may be added - Fix BlockStore::Prune used disk space calculation - Don't materialize data in filecas when we just need the size
* Handle OOM and OOD more gracefully to not spam Sentry with error reports (#434)Dan Engelbrecht2023-10-021-10/+25
| | | | | | - 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
* lightweight gc (#431)Dan Engelbrecht2023-10-021-0/+5
| | | | | | - Feature: Add lightweight GC that only removes items from cache/project store without cleaning up data referenced in Cid store - Add `skipcid` parameter to http endpoint `admin/gc`, defaults to "false" - Add `--skipcid` option to `zen gc` command, defaults to false - Add `--gc-lightweight-interval-seconds` option to zenserver
* adding more stats (#429)Dan Engelbrecht2023-09-281-8/+51
| | | | | - 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
* VFS implementation for local storage service (#396)Stefan Boberg2023-09-201-0/+25
| | | currently, only Windows (using Projected File System) is supported
* add more trace scopes (#362)Dan Engelbrecht2023-09-151-13/+33
| | | | | * more trace scopes * Make sure ReplayLogEntries uses the correct size for oplog buffer * changelog
* Increase retry logic (#325)Dan Engelbrecht2023-06-051-13/+19
| | | | * Increase timeout and number of retries in CacheBucket::PutStandaloneCacheValue when moving temporary file into place * changelog
* fix for commented-out code which was never meant to be checked inStefan Boberg2023-05-171-6/+6
|
* Restructured structured cache store (#314)Stefan Boberg2023-05-171-0/+2127
This change separates out the disk and memory storage strategies into separate cpp/h files to improve maintainability.