@@ -95,12 +95,8 @@ pub type Close = BoxFuture<'static, Option<TxOffset>>;
9595///
9696/// NOTE: This is a preliminary definition, still under consideration.
9797///
98- /// A durability implementation accepts one or more [Transaction]s to be made
99- /// durable via [Durability::commit] in a non-blocking fashion.
100- ///
101- /// A batch of transactions is eventually made durable atomically.
102- /// Note that this means that a torn write can render the whole batch
103- /// inaccessible, so small batches are usually preferable.
98+ /// A durability implementation accepts a [Transaction] to be made durable via
99+ /// the [Durability::append_tx] method in a non-blocking fashion.
104100///
105101/// Once a transaction becomes durable, the [DurableOffset] is updated.
106102/// What durable means depends on the implementation, informally it can be
@@ -115,6 +111,16 @@ pub trait Durability: Send + Sync {
115111 /// cannot be made durable immediately.
116112 ///
117113 /// Errors may be signalled by panicking.
114+ //
115+ // TODO: Support batches of txs, i.e. commits.
116+ //
117+ // The commitlog supports this, but allocation overhead in the durability
118+ // API is too high given we don't make any use of it.
119+ //
120+ // We don't make any use of it because a commit is an atomic unit of storage
121+ // (i.e. a torn write will corrupt all transactions contained in it), and it
122+ // is very unclear when it is both correct and beneficial to bundle more
123+ // than a single transaction into a commit.
118124 fn append_tx ( & self , tx : Transaction < Self :: TxData > ) ;
119125
120126 /// Obtain a handle to the [DurableOffset].
0 commit comments