diff --git a/wal/src/lib.rs b/wal/src/lib.rs
index b60b85a475..54058d5e2e 100644
--- a/wal/src/lib.rs
+++ b/wal/src/lib.rs
@@ -134,10 +134,19 @@ pub enum Error {
UnableToCreateSegmentFile {
source: blocking::WriterError,
},
+}
- UnableToDecodeRecordBatch {
+/// Errors that occur when decoding internal types from a WAL file.
+#[derive(Debug, Snafu)]
+#[snafu(visibility(pub(crate)))]
+pub enum DecodeError {
+ UnableToCreateMutableBatch {
source: mutable_batch_pb::decode::Error,
},
+
+ FailedToReadWal {
+ source: Error,
+ },
}
/// A specialized `Result` for WAL-related errors
@@ -588,22 +597,22 @@ impl WriteOpEntryDecoder {
/// more entries to be decoded from the underlying segment. A zero-length vector
/// may be returned if there are no writes in a WAL entry batch, but does not
/// indicate the decoder is consumed.
- pub fn next_write_op_entry_batch(&mut self) -> Result