Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33289472
D5029.1768723950.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D5029.1768723950.diff
View Options
diff --git a/services/backup/src/Reactors/server/CreateNewBackupReactor.cpp b/services/backup/src/Reactors/server/CreateNewBackupReactor.cpp
--- a/services/backup/src/Reactors/server/CreateNewBackupReactor.cpp
+++ b/services/backup/src/Reactors/server/CreateNewBackupReactor.cpp
@@ -66,36 +66,30 @@
}
response->set_backupid(this->backupID);
this->holder = tools::generateHolder(this->dataHash, this->backupID);
- try {
- put_client_initialize_cxx();
- put_client_write_cxx(
- tools::getBlobPutField(blob::PutRequest::DataCase::kHolder),
- this->holder.c_str());
- put_client_blocking_read_cxx(); // todo this should be avoided
- // (blocking); we should be able to
- // ignore responses; we probably want to
- // delegate performing ops to separate
- // threads in the base reactors
- put_client_write_cxx(
- tools::getBlobPutField(blob::PutRequest::DataCase::kBlobHash),
- this->dataHash.c_str());
+ put_client_initialize_cxx();
+ put_client_write_cxx(
+ tools::getBlobPutField(blob::PutRequest::DataCase::kHolder),
+ this->holder.c_str());
+ put_client_blocking_read_cxx(); // todo this should be avoided
+ // (blocking); we should be able to
+ // ignore responses; we probably want to
+ // delegate performing ops to separate
+ // threads in the base reactors
+ put_client_write_cxx(
+ tools::getBlobPutField(blob::PutRequest::DataCase::kBlobHash),
+ this->dataHash.c_str());
- rust::String responseStr =
- put_client_blocking_read_cxx(); // todo this should be avoided
- // (blocking); we should be able to
- // ignore responses; we probably
- // want to delegate performing ops
- // to separate threads in the base
- // reactors
- // data exists?
- if ((bool)tools::charPtrToInt(responseStr.c_str())) {
- return std::make_unique<ServerBidiReactorStatus>(
- grpc::Status::OK, true);
- }
- } catch (std::exception &e) {
- throw std::runtime_error(
- e.what()); // todo in base reactors we can just handle std exception
- // instead of keep rethrowing here
+ rust::String responseStr =
+ put_client_blocking_read_cxx(); // todo this should be avoided
+ // (blocking); we should be able to
+ // ignore responses; we probably
+ // want to delegate performing ops
+ // to separate threads in the base
+ // reactors
+ // data exists?
+ if ((bool)tools::charPtrToInt(responseStr.c_str())) {
+ return std::make_unique<ServerBidiReactorStatus>(
+ grpc::Status::OK, true);
}
return nullptr;
}
@@ -126,13 +120,7 @@
void CreateNewBackupReactor::terminateCallback() {
const std::lock_guard<std::mutex> lock(this->reactorStateMutex);
- try {
- put_client_terminate_cxx();
- } catch (std::exception &e) {
- throw std::runtime_error(
- e.what()); // todo in base reactors we can just handle std exception
- // instead of keep rethrowing here
- }
+ put_client_terminate_cxx();
// TODO add recovery data
// TODO handle attachments holders
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 18, 8:12 AM (8 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5950957
Default Alt Text
D5029.1768723950.diff (3 KB)
Attached To
Mode
D5029: [services] Rust Integration - Backup - Stop rethrowing in create new backup reactor
Attached
Detach File
Event Timeline
Log In to Comment