Skip to content

Commit

Permalink
persist: fix incorrect "dangling blob keys" WARN
Browse files Browse the repository at this point in the history
In MaterializeInc#21237, I changed how the `into_transmittable_batch` serialization
worked and lost the mark_consumed call. This results in persist
incorrectly concluding that the batch had been dropped without being
processed in some way, and thus incorrectly warning about it.
  • Loading branch information
danhhz committed Aug 28, 2023
1 parent f764d7b commit 8fc8234
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/persist-client/src/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,14 @@ where
/// dropped, the data that it represents will have leaked. The caller is
/// responsible for turning this back into a [`Batch`] using
/// [`WriteHandle::batch_from_transmittable_batch`](crate::write::WriteHandle::batch_from_transmittable_batch).
pub fn into_transmittable_batch(self) -> ProtoBatch {
ProtoBatch {
pub fn into_transmittable_batch(mut self) -> ProtoBatch {
let ret = ProtoBatch {
shard_id: self.shard_id.into_proto(),
version: self.version.to_string(),
batch: Some(self.batch.into_proto()),
}
};
self.mark_consumed();
ret
}
}

Expand Down

0 comments on commit 8fc8234

Please sign in to comment.