aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore
Commit message (Collapse)AuthorAgeFilesLines
...
* fix m_LastFullGcDuration, m_LastFullGCDiff, m_LastFullGcDuration and ↵Dan Engelbrecht2023-10-232-26/+21
| | | | m_LastLightweightGcDuration stats (#494)
* Remove any unreferenced blocks in block store on open (#492)Dan Engelbrecht2023-10-233-8/+24
| | | * Remove any unreferenced blocks in block store on open
* Don't prune block locations due to missing blocks a startup (#487)Dan Engelbrecht2023-10-203-90/+102
| | | | | | * 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-201-4/+0
| | | | | | | 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-206-41/+17
|
* Add --skip-delete option to gc command (#484)Dan Engelbrecht2023-10-203-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-183-32/+147
| | | | | | - 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
* skip lightweight GC if full GC is due soon (#467)Stefan Boberg2023-10-121-20/+30
| | | | | | GC will now skip a lightweight GC if a full GC is due to run within the next lightweight GC interval also fixed some minor typos
* fixed GC logging output stats (#458)Stefan Boberg2023-10-101-1/+1
| | | disk usage stats are now properly reported in log messages
* fix gc infinite loop (#453)Dan Engelbrecht2023-10-061-1/+9
| | | | * make sure we update last gc time even if gc fails * If we can't check if an oplog/project markerfile exists, assume it is not expired
* check that block does not exists on disk before starting write to it (#449)Dan Engelbrecht2023-10-052-18/+46
| | | * check that block does not exists on disk before starting write to it
* Fix curruption of disk cache bucket index on GC (#448)Dan Engelbrecht2023-10-052-30/+39
| | | | | | | | | * 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
* trivial: log output typo in GCStefan Boberg2023-10-051-1/+1
|
* refactor comapactcas index (#443)Dan Engelbrecht2023-10-042-19/+62
| | | | | - 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-035-124/+131
| | | | | | | | | | - 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
* clean up date formatting (#440)Stefan Boberg2023-10-021-4/+4
| | | | * clean up date formatting (previous code would include a newline)
* fix formatting of gc start messagev0.2.26-pre0Dan Engelbrecht2023-10-021-1/+1
|
* Handle OOM and OOD more gracefully to not spam Sentry with error reports (#434)Dan Engelbrecht2023-10-024-26/+121
| | | | | | - 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-024-58/+167
| | | | | | - 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-282-11/+39
| | | | | - 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
* flush block store blocks when finished (#425)Dan Engelbrecht2023-09-271-0/+1
| | | * flush block store block
* add more trace scopes (#362)Dan Engelbrecht2023-09-156-114/+150
| | | | | * more trace scopes * Make sure ReplayLogEntries uses the correct size for oplog buffer * changelog
* More statistics for Cache, Project Store and Cid Store (#405)Dan Engelbrecht2023-09-142-10/+45
| | | | | Cache: requestcount, badrequestcount, writes Project Store: requestcount Cid Store: cidhits, cidmisses, cidwrites
* stream oplog attachments from jupiter (#384)Dan Engelbrecht2023-09-062-75/+27
| | | | | | | | | | * 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
* retry file create (#383)Dan Engelbrecht2023-09-042-3/+27
| | | | | * add retry logic when creating files * only write disk usage log if disk writes are allowed * changelog
* safer gc on low disk (#373)Dan Engelbrecht2023-08-222-37/+46
| | | * - Improvement: Make sure we have disk space available to do GC and use reserve up front if need be
* use robinmap in compact cas (#368)Dan Engelbrecht2023-08-213-10/+19
| | | | | * Use robin-map in compactcas for 30% faster CasContainerStrategy::CollectGarbage * use robin_set in ProjectStore::Oplog::GatherReferences and BlockStore::ReclaimSpace * changelog
* update vcpkg dependencies (#356)Dan Engelbrecht2023-08-111-1/+1
| | | | | | * bump vcpkg version * fmt lib 10 fixes * xmake dependencies (with linux workarounds) * changelog
* catch exceptions when scheduling GC and when writing GC scheduling state (#339)Dan Engelbrecht2023-08-011-136/+149
| | | * catch exceptions when scheduling GC and when writing GC scheduling state
* CidStore now implements the ChunkResolver interfaceStefan Boberg2023-06-304-13/+21
| | | | | this allows client code to use the ChunkResolver interface instead of CidStore, which can help with testing scenarios
* added zen::ChunkResolverStefan Boberg2023-06-301-0/+9
| | | | cherry-picked from sb/proto to reduce delta
* drive-by constStefan Boberg2023-06-121-1/+1
|
* Content scrubbing (#271)Stefan Boberg2023-05-167-103/+316
| | | Added zen scrub command which may be triggered via the zen CLI helper. This traverses storage and validates contents either by content hash and/or by structure. If unexpected data is encountered it is invalidated.
* Additional trace instrumentation (#312)Stefan Boberg2023-05-165-1/+65
| | | | | | | | | * added trace instrumentation to upstreamcache * added asio trace instrumentation * added trace annotations for project store * added trace annotations for BlockStore * added trace annotations for HttpClient * added trace annotations for CAS/GC
* Add `--gc-projectstore-duration-seconds` option (#281)Dan Engelbrecht2023-05-164-45/+83
| | | | | | * Add `--gc-projectstore-duration-seconds` option * Cleanup lua gc options parsing * Remove dead configuration values * changelog
* removed remnants of ZEN_USE_REF_TRACKINGStefan Boberg2023-05-152-28/+0
| | | | this code was originally meant to be used for GC but is no longer needed
* added error reporting for bad BlockStore chunksStefan Boberg2023-05-151-5/+22
| | | | also eliminated some copy-paste
* removed unnecessary #include directives from cas.hStefan Boberg2023-05-151-10/+3
|
* added ScrubStorage to GcStorage base classStefan Boberg2023-05-155-15/+38
|
* added static_assert for BlockStoreDiskLocationStefan Boberg2023-05-151-0/+2
|
* corrected CidStore commentStefan Boberg2023-05-151-4/+0
|
* CidStore::Impl explicit constructor, fixed #ifndef NDEBUGStefan Boberg2023-05-151-3/+4
|
* minor GC API cleanupStefan Boberg2023-05-1510-35/+35
| | | | | Scrub -> ScrubStorage Trigger -> TriggerGc (to make relationship to TriggerScrub clearer)
* Remove ATL header usage (#306)Stefan Boberg2023-05-151-4/+4
| | | ATL has been used here and there as a convenience. Given that this is a legacy component and not always something which gets installed along with the compiler we hereby remove the dependency altogether in favour of our own simple wrappers
* fix logic for old blocks in blockstore gc (#295)Dan Engelbrecht2023-05-121-21/+24
| | | | | | | * fix logic for old blocks in blockstore gc If we will remove all entries in a block and keep nothing we can't expect for the block to exist. If we want to keep entries in a block, the block must exist, if not error and move entries to delete list. Don't reset output block between blocks we are reading from, keep using it until it exceeds the max limit. * changelog
* clang-format (sorry)Stefan Boberg2023-05-111-1/+1
|
* build fix (accidental commit on the wrong branch)Stefan Boberg2023-05-112-1/+4
|
* clang-formatStefan Boberg2023-05-111-1/+3
|
* Merge branch 'main' of https://github.com/EpicGames/zenStefan Boberg2023-05-112-24/+33
|\
| * flush file cas on exit (#291)Dan Engelbrecht2023-05-112-24/+33
| | | | | | | | | | | | | | | | * flush caslog and index snapshot on flush * fix save reading of index/logfile with cleanup write snapshot at flush * don't validate entries we just scanned/created * fix total size found when scanning for cas files * changelog