Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3525990
D4074.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D4074.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D4074: [services] Backup - return log id of the newly created log to the client
Attached
Detach File
Event Timeline
Log In to Comment