diff options
| author | Dan Engelbrecht <[email protected]> | 2024-11-15 10:06:39 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-11-15 10:06:39 +0100 |
| commit | aca6f56fde841454b13ed18136008b0ffe946aed (patch) | |
| tree | 3770efa6c789b45de8ea3ec426da7a77e7813775 /src/zenserver/config.cpp | |
| parent | fixed some issues with ZenServerInstance::SpawnServer (#218) (diff) | |
| download | zen-aca6f56fde841454b13ed18136008b0ffe946aed.tar.xz zen-aca6f56fde841454b13ed18136008b0ffe946aed.zip | |
oplog prep gc fix (#216)
- Added option gc-validation to zenserver that does a check for missing references in all oplog post full GC. Enabled by default.
- Feature: Added option gc-validation to zen gc command to control reference validation. Enabled by default.
- Added more details in post GC log.
- Fixed race condition in oplog writes which could cause used attachments to be incorrectly removed by GC
Diffstat (limited to 'src/zenserver/config.cpp')
| -rw-r--r-- | src/zenserver/config.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/zenserver/config.cpp b/src/zenserver/config.cpp index 2fd9bbaf3..bedab7049 100644 --- a/src/zenserver/config.cpp +++ b/src/zenserver/config.cpp @@ -485,6 +485,7 @@ ParseConfigFile(const std::filesystem::path& Path, ServerOptions.GcConfig.StoreProjectAttachmentMetaData, "gc-projectstore-attachment-store"); LuaOptions.AddOption("gc.attachment.passes"sv, ServerOptions.GcConfig.AttachmentPassCount, "gc-attachment-passes"sv); + LuaOptions.AddOption("gc.validation"sv, ServerOptions.GcConfig.EnableValidation, "gc-validation"); ////// gc LuaOptions.AddOption("gc.cache.maxdurationseconds"sv, ServerOptions.GcConfig.Cache.MaxDurationSeconds, "gc-cache-duration-seconds"sv); @@ -890,6 +891,13 @@ ParseCliOptions(int argc, char* argv[], ZenServerOptions& ServerOptions) options.add_option("gc", "", + "gc-validation", + "Enable validation of references after full GC.", + cxxopts::value<bool>(ServerOptions.GcConfig.EnableValidation)->default_value("true"), + ""); + + options.add_option("gc", + "", "gc-enabled", "Whether garbage collection is enabled or not.", cxxopts::value<bool>(ServerOptions.GcConfig.Enabled)->default_value("true"), |