aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* added details to trace initialization (#588)Stefan Boberg2023-12-111-3/+3
| | | this adds information on program name and command line to trace initialization
* improved scrubbing of oplogs and filecas (#596)Stefan Boberg2023-12-111-2/+17
| | | | | | - 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>
* optimized index snapshot reading/writing (#561)Stefan Boberg2023-11-271-0/+2
| | | | | the previous implementation of in-memory index snapshots serialise data to memory before writing to disk and vice versa when reading. This leads to some memory spikes which end up pushing useful data out of system cache and also cause stalls on I/O operations. this change moves more code to a streaming serialisation approach which scales better from a memory usage perspective and also performs much better
* fix block cloning copy argument validation (#560)Stefan Boberg2023-11-221-0/+1
|
* add zenserver state snapshot support (#543)Stefan Boberg2023-11-161-1/+6
| | | | | 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.
* fix race contdition when signaling shutdown of process and waiting for ↵Dan Engelbrecht2023-11-151-3/+5
| | | | completion (#539)
* spdlog implementation hiding (#498)Stefan Boberg2023-11-061-2/+2
| | | | | | | | | 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`.
* eliminate redundant logging code (#499)Stefan Boberg2023-10-251-2/+2
| | | | | | | | | 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
* added command line option to start server clean (#481)Stefan Boberg2023-10-171-0/+5
| | | when specified with `--clean`, the data directory will be wiped clean at startup
* fix clang-format whoopsieStefan Boberg2023-10-111-1/+1
|
* added back main thread nameStefan Boberg2023-10-111-0/+2
| | | | this was there before but lost in a merge recently
* zenserver project restructuring (#442)Stefan Boberg2023-10-061-0/+390