Page MenuHomePhabricator

D4074.diff
No OneTemporary

D4074.diff

diff --git a/native/cpp/CommonCpp/grpc/protos/backup.proto b/native/cpp/CommonCpp/grpc/protos/backup.proto
--- a/native/cpp/CommonCpp/grpc/protos/backup.proto
+++ b/native/cpp/CommonCpp/grpc/protos/backup.proto
@@ -20,7 +20,7 @@
service BackupService {
rpc CreateNewBackup(stream CreateNewBackupRequest) returns (stream CreateNewBackupResponse) {}
- rpc SendLog(stream SendLogRequest) returns (google.protobuf.Empty) {}
+ rpc SendLog(stream SendLogRequest) returns (SendLogResponse) {}
rpc RecoverBackupKey(stream RecoverBackupKeyRequest) returns (stream RecoverBackupKeyResponse) {}
rpc PullBackup(PullBackupRequest) returns (stream PullBackupResponse) {}
}
@@ -52,6 +52,10 @@
}
}
+message SendLogResponse {
+ string logCheckpoint = 1;
+}
+
// RecoverBackupKey
message RecoverBackupKeyRequest {
diff --git a/services/backup/src/BackupServiceImpl.h b/services/backup/src/BackupServiceImpl.h
--- a/services/backup/src/BackupServiceImpl.h
+++ b/services/backup/src/BackupServiceImpl.h
@@ -21,7 +21,7 @@
grpc::ServerReadReactor<backup::SendLogRequest> *SendLog(
grpc::CallbackServerContext *context,
- google::protobuf::Empty *response) override;
+ backup::SendLogResponse *response) override;
grpc::ServerBidiReactor<
backup::RecoverBackupKeyRequest,
diff --git a/services/backup/src/BackupServiceImpl.cpp b/services/backup/src/BackupServiceImpl.cpp
--- a/services/backup/src/BackupServiceImpl.cpp
+++ b/services/backup/src/BackupServiceImpl.cpp
@@ -27,7 +27,7 @@
grpc::ServerReadReactor<backup::SendLogRequest> *BackupServiceImpl::SendLog(
grpc::CallbackServerContext *context,
- google::protobuf::Empty *response) {
+ backup::SendLogResponse *response) {
return new reactor::SendLogReactor(response);
}
diff --git a/services/backup/src/Reactors/server/SendLogReactor.h b/services/backup/src/Reactors/server/SendLogReactor.h
--- a/services/backup/src/Reactors/server/SendLogReactor.h
+++ b/services/backup/src/Reactors/server/SendLogReactor.h
@@ -15,7 +15,7 @@
class SendLogReactor : public ServerReadReactorBase<
backup::SendLogRequest,
- google::protobuf::Empty> {
+ backup::SendLogResponse> {
enum class State {
USER_ID = 1,
BACKUP_ID = 2,
@@ -52,7 +52,7 @@
void initializePutReactor();
public:
- using ServerReadReactorBase<backup::SendLogRequest, google::protobuf::Empty>::
+ using ServerReadReactorBase<backup::SendLogRequest, backup::SendLogResponse>::
ServerReadReactorBase;
std::unique_ptr<grpc::Status>
diff --git a/services/backup/src/Reactors/server/SendLogReactor.cpp b/services/backup/src/Reactors/server/SendLogReactor.cpp
--- a/services/backup/src/Reactors/server/SendLogReactor.cpp
+++ b/services/backup/src/Reactors/server/SendLogReactor.cpp
@@ -63,6 +63,7 @@
}
this->backupID = request.backupid();
this->logID = this->generateLogID(this->backupID);
+ this->response->set_logcheckpoint(this->logID);
this->state = State::LOG_HASH;
return nullptr;
};

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 7:04 PM (8 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2700850
Default Alt Text
D4074.diff (3 KB)

Event Timeline