journal: introduce proper error codes
Journal used to have only one error code in journal_entry.res: -1. It had at least 2 problems: - There was an assumption that TXN_SIGNATURE_ROLLBACK is the same as journal_entry error = -1; - It wasn't possible to tell if the entry tried to be written and failed, or it didn't try yet. Both looked as -1. The patch introduces a new error code JOURNAL_ENTRY_ERR_UNKNOWN. The IO error now has its own value: JOURNAL_ENTRY_ERR_IO. This helps to ensure that a not finished journal entry or a transaction won't try to obtain a diag error for their result. Part of #6027
Showing
- src/box/journal.c 1 addition, 0 deletionssrc/box/journal.c
- src/box/journal.h 14 additions, 1 deletionsrc/box/journal.h
- src/box/txn.c 4 additions, 2 deletionssrc/box/txn.c
- src/box/txn.h 10 additions, 3 deletionssrc/box/txn.h
- src/box/txn_limbo.c 3 additions, 2 deletionssrc/box/txn_limbo.c
- src/box/wal.c 2 additions, 2 deletionssrc/box/wal.c
Loading
Please register or sign in to comment