Skip to content

freeze thaw state and response #199

@crpb

Description

@crpb

I usually do freeze, flush , edit, thaw. But thats something else :p

gromox/tools/mbop_main.cpp

Lines 195 to 214 in cf051aa

static int freeze_main(int argc, char **argv)
{
if (HX_getopt6(g_options_table, argc, argv, nullptr,
HXOPT_USAGEONERR) != HXOPT_ERR_SUCCESS || g_exit_after_optparse)
return EXIT_PARAM;
/*
* db_maint_mode::hold is not offered presently, since exmdb is prone
* to get into out-of-memory situations when used.
*/
enum db_maint_mode mode = g_fast ? db_maint_mode::reject :
db_maint_mode::reject_waitforexcl;
auto ok = exmdb_client->set_maintenance(g_storedir, static_cast<uint32_t>(mode));
if (!ok) {
mbop_fprintf(stderr, "%s: the operation failed\n", argv[0]);
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
}

gromox/tools/mbop_main.cpp

Lines 167 to 168 in cf051aa

else if (strcmp(argv[0], "thaw") == 0)
ok = exmdb_client->set_maintenance(g_storedir, static_cast<uint32_t>(db_maint_mode::usable));

Hey, sure i can guess that the return code zero will mean that those calls worked but maybe this -v switch could make it tell others than itself.
And might it be possible to somehow retrieve the status?

Here i want to freeze snap, thaw. I do that but does it make a difference and can i somehow check if it would have even made a difference or maybe i should have asked a little nicer to freeze so i can begin with my stuff 🙈

o/

Christopher

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions