aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/zenserver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* harden attach sponsor process (#14)Dan Engelbrecht2024-03-211-14/+31
| | | | | - Improvement: Delay exiting due to no sponsor processes by one second to handle race conditions - Improvement: Safer IsProcessRunning check - Improvement: make sure we can RequestApplicationExit safely from any thread
* improved process monitoring behaviour with invalid pids (#16)Stefan Boberg2024-03-211-2/+3
|
* make sure zenserver reacts and exist on SIGTERM signal (#8)Dan Engelbrecht2024-03-151-0/+6
| | | | | * make sure zenserver reacts and exist on SIGTERM signal * add zen tag to all runners * temp disable mac codesigning
* clean up test linking (#4)Dan Engelbrecht2024-03-141-0/+10
| | | | | | | - Improvement: Add zenhttp-test and zenutil-test - Improvement: Moved cachepolicy test to cachepolicy.cpp - Improvement: Renamed cachestore tests from z$ to cachestore - Improvement: Moved test linking so test for a lib is linked by <lib>-test - Improvement: Removed HttpRequestParseRelativeUri in httpstructuredcache.cpp and use the one in cacherequests.h instead
* remove reference caching (#658)Dan Engelbrecht2024-02-271-5/+4
| | | * remove reference caching
* separate RPC processing from HTTP processing (#626)Stefan Boberg2023-12-201-1/+1
| | | | | | * moved all RPC processing from HttpStructuredCacheService into separate CacheRpcHandler class in zenstore * move package marshaling to zenutil. was previously in zenhttp/httpshared but it's useful in other contexts as well where we don't want to depend on zenhttp * introduced UpstreamCacheClient, this provides a subset of functions on UpstreamCache and lives in zenstore
* Adding an info command to display a top-level summary of disk space etc (#602)Stefan Boberg2023-12-121-8/+44
| | | | | this also adds a central, shared folder for storing information which may be found by any instance on the host. The directory is currently located alongside the default install and state directory. Initially this is used to store a collection of known `root_manifest` locations and a copy of the latest manifest version which allow us to find all known locations where zen state is present.
* improved scrubbing of oplogs and filecas (#596)Stefan Boberg2023-12-111-4/+64
| | | | | | - Improvement: Scrub command now validates compressed buffer hashes in filecas storage (used for large chunks) - Improvement: Added --dry, --no-gc and --no-cas options to zen scrub command - Improvement: Implemented oplog scrubbing (previously was a no-op) - Improvement: Implemented support for running scrubbint at startup with --scrub=<options>
* multi-line logging improvements (#597)Stefan Boberg2023-12-111-6/+7
| | | | | | * added ZEN_SCOPED_WARN and implemented multi-line logging * changed so file log also uses `fullformatter` for consistency and to get the multi-line support across the board
* HTTP plugin request debug logging (#587)Stefan Boberg2023-12-051-1/+1
| | | | | | * added log level control/query to LoggerRef * added debug logging to http plugin implementation * added GetDebugName() to transport plugin interfaces * added debug name to log output
* Add context to Zen upstream resolve error message (#585)Stefan Boberg2023-12-041-1/+1
|
* safe threadpool shutdown (#584)Dan Engelbrecht2023-12-041-1/+2
| | | * shut down thread pools earlier to worker threads has a chance to terminate before main thread atexit
* global thread worker pools (#577)Dan Engelbrecht2023-11-291-0/+2
| | | - Improvement: Use two global worker thread pools instead of ad-hoc creation of worker pools
* gc stop command (#569)v0.2.36-pre2Dan Engelbrecht2023-11-271-3/+3
| | | | | - Feature: New endpoint `/admin/gc-stop` to cancel a running garbage collect operation - Feature: Added `zen gc-stop` command to cancel a running garbage collect operation - Bugfix: GCv2 - make sure to discover all projects and oplogs before checking for expired data
* added --powercycle option (#565)Stefan Boberg2023-11-231-0/+8
| | | | | * added --powercycle option. when this is passed in the zenserver process will shut down immediately after initialization is complete. This is primarily useful when benchmarking init/cleanup but could also be used to verify/clean up disk state * moved EmptyStandbyList code to make it accessible to more commands
* add command line options for compact block threshold and gc verbose (#557)Dan Engelbrecht2023-11-211-1/+3
| | | | | | | | | | | - 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
* blocking queue fix (#550)Dan Engelbrecht2023-11-161-1/+1
| | | | | | | | | * 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
* Make object store endpoint S3 compatible. (#535)Per Larsson2023-11-151-1/+0
| | | | | * 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-151-1/+1
| | | | completion (#539)
* reduce number of files generated on shared instances (#524)Stefan Boberg2023-11-091-0/+5
|
* 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.
* factored out some compiler definitions etc into zenbase (#517)Stefan Boberg2023-11-071-1/+1
| | | | | 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.
* statsd for cas (#511)Dan Engelbrecht2023-11-061-0/+1
| | | | * separate statsd interfaces so they can be accessible to zenstore * statsd for cas
* New GC implementation (#459)Dan Engelbrecht2023-10-301-1/+2
| | | - Feature: New garbage collection implementation, still in evaluation mode. Enabled by `--gc-v2` command line option
* statsd metrics reporting (#496)Stefan Boberg2023-10-251-1/+27
| | | | | 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
* removed HttpCidStore (#497)Stefan Boberg2023-10-241-4/+0
|
* merge disk and memory layers (#493)Dan Engelbrecht2023-10-241-12/+11
| | | | - 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
* Cache (rpc) activitity recording improvements (#482)Stefan Boberg2023-10-201-3/+4
| | | | | | | 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
* add `flush` command and more gc status info (#483)Dan Engelbrecht2023-10-181-1/+3
| | | | | | - 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
* added command line option to start server clean (#481)Stefan Boberg2023-10-171-30/+38
| | | when specified with `--clean`, the data directory will be wiped clean at startup
* rewite state marker at startup (#477)Dan Engelbrecht2023-10-171-6/+4
| | | * rewrite state_marker at startup
* Change default port to 8558zousar2023-10-111-1/+1
| | | | Changes the default port without altering config for shared instances.
* remove legacy compute interfaces (#461)Stefan Boberg2023-10-111-79/+0
| | | | | * removed legacy compute code, which will be replaced with a new implementation in the future * also updated references to Jupiter storage
* cache reference tracking (#455)Dan Engelbrecht2023-10-101-0/+1
| | | | | - 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
* minor: remove double includeDan Engelbrecht2023-10-061-1/+0
|
* zenserver project restructuring (#442)Stefan Boberg2023-10-061-1077/+410
|
* added thread names (#441)Stefan Boberg2023-10-041-0/+2
| | | added names to process handle GC thread and main thread for easier identification in crash dumps / process monitoring
* removed websocket protocol support(#445)Stefan Boberg2023-10-041-22/+0
| | | removed websocket support since it is not used right now and is unlikely to be used in the future
* Limit size of memory cache layer (#423)Dan Engelbrecht2023-10-021-8/+12
| | | | | | | | - Feature: Limit the size ZenCacheMemoryLayer may use - `--cache-memlayer-targetfootprint` option to set which size (in bytes) it should be limited to, zero to have it unbounded - `--cache-memlayer-maxage` option to set how long (in seconds) cache items should be kept in the memory cache Do more "standard" GC rather than clearing everything. Tries to purge memory on Get/Put on the fly if exceeding limit - not sure if we should have a polling thread instead of adding overhead to Get/Put (however light it may be).
* lightweight gc (#431)Dan Engelbrecht2023-10-021-2/+6
| | | | | | - 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
* Sentry username fix (#435)Stefan Boberg2023-10-011-2/+2
| | | * fix trailing null in Sentry username (GetUserName returns the length including NUL terminator)
* handle error in error log (#422)Dan Engelbrecht2023-09-251-15/+46
| | | * do not allow exceptions to leak from Sentry error reporting or SentryAssertImpl::OnAssert
* Add runtime status/control of logging (#419)Dan Engelbrecht2023-09-221-8/+15
| | | | | | | | | | | - Feature: New endpoint `/admin/logs` to query status of logging and log file locations and cache logging - `enablewritelog`=`true`/`false` parameter to control cache write logging - `enableaccesslog`=`true`/`false` parameter to control cache access logging - `loglevel` = `trace`/`debug`/`info`/`warning`/`error` - Feature: New zen command `logs` to query/control zen logging - No arguments gives status of logging and paths to log files - `--cache-write-log` `enable`/`disable` to control cache write logging - `--cache-access-log` `enable`/`disable` to control cache access logging - `--loglevel` `trace`/`debug`/`info`/`warning`/`error` to set debug level
* add trace command to enable/disable tracing at runtime (#416)Dan Engelbrecht2023-09-221-12/+4
| | | | | * add trace command to enable/disable tracing at runtime * rework tracing init/start/stop * changelog
* controlled zenserver shutdown (#413)Dan Engelbrecht2023-09-201-20/+36
| | | * Do controlled shutdown of zenserver catching any exception thrown during shutdown
* VFS implementation for local storage service (#396)Stefan Boberg2023-09-201-0/+7
| | | currently, only Windows (using Projected File System) is supported
* add DiskWriteBlocker to structured cache store log writer (#408)Dan Engelbrecht2023-09-151-1/+2
| | | | | * add DiskWriteBlocker to structured cache store log writer * changelog
* http and httpsys config options (#401)Dan Engelbrecht2023-09-141-2/+2
| | | | * Added `--http-threads`, `--httpsys-async-work-threads`, `--httpsys-enable-request-logging` and `--httpsys-enable-async-response` command line options to zenserver * remove unused CreateHttpSysServer
* job queue and async oplog-import/export (#395)Dan Engelbrecht2023-09-131-3/+15
| | | | | | | | | | | | | | | | - 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