Make sure that we're not inserting while dumping

This commit is contained in:
Ai Lin Chia
2017-04-28 13:17:54 +02:00
parent 249bbb6187
commit 465d7c0896

@ -1347,11 +1347,9 @@ bool Rdb::addRecord(collnum_t collnum, const char *key, const char *data, int32_
return false;
}
// don't continue if we're not allowed to add to Rdb
// we must not get into this state (we must not insert while dumping; and vice versa)
if (isDumping()) {
g_errno = ETRYAGAIN;
logTrace(g_conf.m_logTraceRdb, "END. %s: Unable to add. Returning false", m_dbname);
return false;
gbshutdownLogicError();
}
// sanity check