@@ -74,7 +74,9 @@ static bool gc_threshold_check (flux_t *h, optparse_t *p)
7474 get_gc_threshold (h , & gc_threshold );
7575
7676 if (gc_threshold > 0 && version > gc_threshold ) {
77- if (optparse_hasopt (p , "yes" ) || optparse_hasopt (p , "no" )) {
77+ if (optparse_hasopt (p , "yes" )
78+ || optparse_hasopt (p , "no" )
79+ || optparse_hasopt (p , "skip-gc" )) {
7880 if (optparse_hasopt (p , "yes" ))
7981 rc = true;
8082 else
@@ -143,6 +145,11 @@ static int subcmd (optparse_t *p, int ac, char *av[])
143145 if (optparse_hasopt (p , "background" ))
144146 flags &= ~FLUX_RPC_STREAMING ;
145147
148+ if (optparse_hasopt (p , "skip-gc" )) {
149+ if (flux_attr_set (h , "content.dump" , "" ) < 0 )
150+ log_err_exit ("error clearing content.dump attribute" );
151+ }
152+
146153 if (optparse_hasopt (p , "gc" )
147154 || optparse_hasopt (p , "dump" )
148155 || gc_threshold_check (h , p )) {
@@ -176,6 +183,9 @@ static int subcmd (optparse_t *p, int ac, char *av[])
176183}
177184
178185static struct optparse_option opts [] = {
186+ { .name = "skip-gc" , .has_arg = 0 ,
187+ .usage = "Skip KVS garbage collection this time, if already enabled" ,
188+ },
179189 { .name = "gc" , .has_arg = 0 ,
180190 .usage = "Garbage collect KVS (short for --dump=auto)" ,
181191 },
0 commit comments