You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
strcpy(pathbuf, options.db_name);
strcat(pathbuf, ".db.super");
db->fp_superblock=fopen(pathbuf, "w");
if (db->fp_superblock==NULL) {
mdb_free(db);
returnmdb_status(MDB_ERR_OPEN_FILE,
"cannot open superblock file as write");
}
The error above is recoverable. If one cannot fopen a database super file as write, there is exactly no loss. However, the following error, is non-recoverable
There will be inconsistency in database files if any of the allocation/write step fails, and the corresponding rollback steps fails too.
It is really necessary to distinguish between recoverable and non-recoverable (critical) errors. A bitmask would be fine.
The text was updated successfully, but these errors were encountered:
As is known before, there're two kinds of errors:
The error above is recoverable. If one cannot
fopen
a database super file as write, there is exactly no loss. However, the following error, is non-recoverableThere will be inconsistency in database files if any of the allocation/write step fails, and the corresponding rollback steps fails too.
It is really necessary to distinguish between recoverable and non-recoverable (critical) errors. A bitmask would be fine.
The text was updated successfully, but these errors were encountered: