Skip to content

Commit

Permalink
Merge pull request #21810 from petrosagg/controller-no-state-struct
Browse files Browse the repository at this point in the history
storage: merge `Controller` with `StorageControllerState`
  • Loading branch information
petrosagg authored Sep 19, 2023
2 parents 6b1ae80 + d092637 commit 49f50b7
Show file tree
Hide file tree
Showing 2 changed files with 208 additions and 274 deletions.
7 changes: 3 additions & 4 deletions src/storage-controller/src/command_wals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ where
{
SHARD_FINALIZATION
.insert_without_overwrite(
&mut self.state.stash,
&mut self.stash,
entries.into_iter().map(|key| (key.into_proto(), ())),
)
.await
Expand All @@ -75,7 +75,7 @@ where
.map(|s| RustType::into_proto(&s))
.collect();
SHARD_FINALIZATION
.delete_keys(&mut self.state.stash, proto_shards)
.delete_keys(&mut self.stash, proto_shards)
.await
.expect("must be able to write to stash")
}
Expand Down Expand Up @@ -110,7 +110,6 @@ where

// Get stash metadata.
let (metadata, shard_finalization) = self
.state
.stash
.with_transaction(move |tx| {
Box::pin(async move {
Expand Down Expand Up @@ -178,7 +177,7 @@ where
.map(|id| RustType::into_proto(&id))
.collect();
super::METADATA_COLLECTION
.delete_keys(&mut self.state.stash, proto_ids_to_drop)
.delete_keys(&mut self.stash, proto_ids_to_drop)
.await
.expect("stash operation must succeed");
}
Expand Down
Loading

0 comments on commit 49f50b7

Please sign in to comment.