Skip to content

Commit

Permalink
filed: Add extra logging on failing transactions in LMBD.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Apr 21, 2016
1 parent 1fc9945 commit ad99f60
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/filed/accurate_lmdb.c
Expand Up @@ -208,11 +208,13 @@ bool B_ACCURATE_LMDB::add_file(JCR *jcr,
result = mdb_txn_begin(m_db_env, NULL, 0, &m_db_rw_txn);
if (result == 0) {
goto retry;
} else {
Jmsg1(jcr, M_FATAL, 0, _("Unable create new transaction: %s\n"), mdb_strerror(result));
}
} else {
Jmsg1(jcr, M_FATAL, 0, _("Unable to commit full transaction: %s\n"), mdb_strerror(result));
}
/*
* Fallthrough wanted.
*/
break;
default:
Jmsg1(jcr, M_FATAL, 0, _("Unable insert new data: %s\n"), mdb_strerror(result));
break;
Expand Down Expand Up @@ -379,11 +381,13 @@ bool B_ACCURATE_LMDB::update_payload(JCR *jcr, char *fname, accurate_payload *pa
result = mdb_txn_begin(m_db_env, NULL, 0, &m_db_rw_txn);
if (result == 0) {
goto retry;
} else {
Jmsg1(jcr, M_FATAL, 0, _("Unable create new transaction: %s\n"), mdb_strerror(result));
}
} else {
Jmsg1(jcr, M_FATAL, 0, _("Unable to commit full transaction: %s\n"), mdb_strerror(result));
}
/*
* Fallthrough wanted.
*/
break;
default:
Jmsg1(jcr, M_FATAL, 0, _("Unable insert new data: %s\n"), mdb_strerror(result));
break;
Expand Down

0 comments on commit ad99f60

Please sign in to comment.