diff options
Diffstat (limited to 'src/dbutil.c')
-rw-r--r-- | src/dbutil.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dbutil.c b/src/dbutil.c index 09c092d..b13f244 100644 --- a/src/dbutil.c +++ b/src/dbutil.c @@ -189,6 +189,11 @@ uint32_t get_version_timestamp(struct syrep_db_context *c, uint32_t v) { key.size = sizeof(version); if ((ret = c->db_version_timestamp->get(c->db_version_timestamp, NULL, &key, &data, 0))) { + + /* If the specific history entry was lost: return the epoch */ + if (ret == DB_NOTFOUND) + return 0; + c->db_version_timestamp->err(c->db_version_timestamp, ret, "version_timestamp::get"); return (uint32_t) -1; } |