diff options
| author | Dan Engelbrecht <[email protected]> | 2024-09-30 09:59:34 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-09-30 09:59:34 +0200 |
| commit | ebec68d49b2c968ecf684973b33f9f3d1d56b702 (patch) | |
| tree | 39de29b8d6b24d071d38254e40b5ee850b7c1299 /src/zen/cmds/admin_cmd.cpp | |
| parent | optimize startup time (#175) (diff) | |
| download | archived-zen-ebec68d49b2c968ecf684973b33f9f3d1d56b702.tar.xz archived-zen-ebec68d49b2c968ecf684973b33f9f3d1d56b702.zip | |
gc command attachment options (#176)
* zen command - add options to control meta data cache when triggering gc
Diffstat (limited to 'src/zen/cmds/admin_cmd.cpp')
| -rw-r--r-- | src/zen/cmds/admin_cmd.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/zen/cmds/admin_cmd.cpp b/src/zen/cmds/admin_cmd.cpp index fbac0bbf3..d7fc1710d 100644 --- a/src/zen/cmds/admin_cmd.cpp +++ b/src/zen/cmds/admin_cmd.cpp @@ -131,6 +131,20 @@ GcCommand::GcCommand() "Reference filter higher limit - defaults to no limit", cxxopts::value(m_ReferenceHashHigh), "<refhighlimit>"); + + m_Options.add_option("", + "", + "cache-attachment-store", + "Enable storing attachments referenced by a cache record in block store meta data", + cxxopts::value(m_StoreCacheAttachmentMetaData)->default_value("false"), + "<cache-attachments-store>"); + + m_Options.add_option("", + "", + "projectstore-attachment-store", + "Enable storing attachments referenced by project oplogs in meta data", + cxxopts::value(m_StoreProjectAttachmentMetaData)->default_value("false"), + "<project-attachments-store>"); } GcCommand::~GcCommand() @@ -215,6 +229,15 @@ GcCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) Params.Add({"verbose", m_Verbose ? "true" : "false"}); Params.Add({"singlethreaded", m_SingleThreaded ? "true" : "false"}); + if (m_StoreCacheAttachmentMetaData) + { + Params.Add({"storecacheattachmentmetadata", m_StoreCacheAttachmentMetaData ? "true" : "false"}); + } + if (m_StoreProjectAttachmentMetaData) + { + Params.Add({"storeprojectattachmentmetadata", m_StoreProjectAttachmentMetaData ? "true" : "false"}); + } + cpr::Session Session; Session.SetHeader(cpr::Header{{"Accept", "application/json"}}); Session.SetUrl({fmt::format("{}/admin/gc", m_HostName)}); |