> (you don't have to strictly follow this form)

**Use case**

Support manually snapshot for Keeper.

**Describe the solution you'd like**

Throught 4lw commands, such as `csnp`.


if (initialized_flag)
    {
        switch (type)
        {
            
            case nuraft::cb_func::PreAppendLog:
            {
                
                
                auto & entry = *static_cast<LogEntryPtr *>(param->ctx);
                assert(entry->get_val_type() == nuraft::app_log);
                auto next_zxid = state_machine->getNextZxid();
                auto & entry_buf = entry->get_buf();
                auto request_for_session = state_machine->parseRequest(entry_buf);
                request_for_session.zxid = next_zxid;
                if (!state_machine->preprocess(request_for_session))
                    return nuraft::cb_func::ReturnCode::ReturnNull;
                request_for_session.digest = state_machine->getNodesDigest();
                entry = nuraft::cs_new<nuraft::log_entry>(entry->get_term(), getZooKeeperLogEntry(request_for_session), entry->get_val_type());
                break;
            }
            case nuraft::cb_func::AppendLogFailed:
            {
                
                
                auto & entry = *static_cast<LogEntryPtr *>(param->ctx);
                assert(entry->get_val_type() == nuraft::app_log);
                auto & entry_buf = entry->get_buf();
                auto request_for_session = state_machine->parseRequest(entry_buf);
                state_machine->rollbackRequest(request_for_session, true);