Skip to content

Commit

Permalink
br-stream: added store error to the store (#32)
Browse files Browse the repository at this point in the history
* br-stream: added store error to the store

* revert kvproto

* Update Cargo.lock
  • Loading branch information
YuJuncen authored Mar 10, 2022
1 parent 52c4903 commit 9245791
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/import/sst_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,10 @@ where
let mut import_err = kvproto::import_sstpb::Error::default();
let err = r.response.get_header().get_error();
import_err
.set_message(format!("failed to complete raft command: {:?}", err));
.set_message(format!("failed to complete raft command"));
// FIXME: if there are many errors, we may lose some of them here.
import_err
.set_store_error(err.clone());
warn!("failed to apply the file to the store"; "error" => ?err, "file" => %meta.get_name());
resp.set_error(import_err);
}
Expand Down

0 comments on commit 9245791

Please sign in to comment.