box/journal: redesign journal operations
Currently the journal provides only one method -- write,
which implies a callback to trigger upon write completion
(in contrary with 1.10 series where all commits were
processing in synchronous way).
Lets make difference between sync and async writes more
notable: provide journal::write_async method which runs
completion function once entry is written, in turn
journal:write handle transaction in synchronous way.
Redesing notes:
1) The callback for async write set once in journal
creation. There is no need to carry callback in
every journal entry. This allows us to save some
memory;
2) txn_commit and txn_commit_async call txn_rollback
where appropriate;
3) no need to call journal_entry_complete on sync
writes anymore;
4) wal_write_in_wal_mode_none is too long, renamed
to wal_write_none;
5) wal engine use async writes internally but it is
transparent to callers.
Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com>
Showing
- src/box/box.cc 4 additions, 4 deletionssrc/box/box.cc
- src/box/journal.c 32 additions, 8 deletionssrc/box/journal.c
- src/box/journal.h 57 additions, 29 deletionssrc/box/journal.h
- src/box/txn.c 29 additions, 31 deletionssrc/box/txn.c
- src/box/txn.h 1 addition, 1 deletionsrc/box/txn.h
- src/box/vy_log.c 3 additions, 2 deletionssrc/box/vy_log.c
- src/box/wal.c 49 additions, 12 deletionssrc/box/wal.c
- src/box/wal.h 2 additions, 2 deletionssrc/box/wal.h
Loading
Please register or sign in to comment