Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3738212
D3562.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
14 KB
Referenced Files
None
Subscribers
None
D3562.diff
View Options
diff --git a/native/cpp/CommonCpp/grpc/_generated/backup.pb.h b/native/cpp/CommonCpp/grpc/_generated/backup.pb.h
--- a/native/cpp/CommonCpp/grpc/_generated/backup.pb.h
+++ b/native/cpp/CommonCpp/grpc/_generated/backup.pb.h
@@ -512,7 +512,8 @@
}
enum DataCase {
kUserID = 1,
- kLogData = 2,
+ kLogHash = 2,
+ kLogData = 3,
DATA_NOT_SET = 0,
};
@@ -592,7 +593,8 @@
enum : int {
kUserIDFieldNumber = 1,
- kLogDataFieldNumber = 2,
+ kLogHashFieldNumber = 2,
+ kLogDataFieldNumber = 3,
};
// string userID = 1;
bool has_userid() const;
@@ -614,7 +616,27 @@
std::string* _internal_mutable_userid();
public:
- // bytes logData = 2;
+ // bytes logHash = 2;
+ bool has_loghash() const;
+ private:
+ bool _internal_has_loghash() const;
+ public:
+ void clear_loghash();
+ const std::string& loghash() const;
+ void set_loghash(const std::string& value);
+ void set_loghash(std::string&& value);
+ void set_loghash(const char* value);
+ void set_loghash(const void* value, size_t size);
+ std::string* mutable_loghash();
+ std::string* release_loghash();
+ void set_allocated_loghash(std::string* loghash);
+ private:
+ const std::string& _internal_loghash() const;
+ void _internal_set_loghash(const std::string& value);
+ std::string* _internal_mutable_loghash();
+ public:
+
+ // bytes logData = 3;
bool has_logdata() const;
private:
bool _internal_has_logdata() const;
@@ -640,6 +662,7 @@
private:
class _Internal;
void set_has_userid();
+ void set_has_loghash();
void set_has_logdata();
inline bool has_data() const;
@@ -652,6 +675,7 @@
constexpr DataUnion() : _constinit_{} {}
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr userid_;
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr loghash_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr logdata_;
} data_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
@@ -1940,7 +1964,117 @@
// @@protoc_insertion_point(field_set_allocated:backup.SendLogRequest.userID)
}
-// bytes logData = 2;
+// bytes logHash = 2;
+inline bool SendLogRequest::_internal_has_loghash() const {
+ return data_case() == kLogHash;
+}
+inline bool SendLogRequest::has_loghash() const {
+ return _internal_has_loghash();
+}
+inline void SendLogRequest::set_has_loghash() {
+ _oneof_case_[0] = kLogHash;
+}
+inline void SendLogRequest::clear_loghash() {
+ if (_internal_has_loghash()) {
+ data_.loghash_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
+ clear_has_data();
+ }
+}
+inline const std::string& SendLogRequest::loghash() const {
+ // @@protoc_insertion_point(field_get:backup.SendLogRequest.logHash)
+ return _internal_loghash();
+}
+inline void SendLogRequest::set_loghash(const std::string& value) {
+ _internal_set_loghash(value);
+ // @@protoc_insertion_point(field_set:backup.SendLogRequest.logHash)
+}
+inline std::string* SendLogRequest::mutable_loghash() {
+ // @@protoc_insertion_point(field_mutable:backup.SendLogRequest.logHash)
+ return _internal_mutable_loghash();
+}
+inline const std::string& SendLogRequest::_internal_loghash() const {
+ if (_internal_has_loghash()) {
+ return data_.loghash_.Get();
+ }
+ return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited();
+}
+inline void SendLogRequest::_internal_set_loghash(const std::string& value) {
+ if (!_internal_has_loghash()) {
+ clear_data();
+ set_has_loghash();
+ data_.loghash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ }
+ data_.loghash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
+}
+inline void SendLogRequest::set_loghash(std::string&& value) {
+ // @@protoc_insertion_point(field_set:backup.SendLogRequest.logHash)
+ if (!_internal_has_loghash()) {
+ clear_data();
+ set_has_loghash();
+ data_.loghash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ }
+ data_.loghash_.Set(
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
+ // @@protoc_insertion_point(field_set_rvalue:backup.SendLogRequest.logHash)
+}
+inline void SendLogRequest::set_loghash(const char* value) {
+ GOOGLE_DCHECK(value != nullptr);
+ if (!_internal_has_loghash()) {
+ clear_data();
+ set_has_loghash();
+ data_.loghash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ }
+ data_.loghash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{},
+ ::std::string(value), GetArena());
+ // @@protoc_insertion_point(field_set_char:backup.SendLogRequest.logHash)
+}
+inline void SendLogRequest::set_loghash(const void* value,
+ size_t size) {
+ if (!_internal_has_loghash()) {
+ clear_data();
+ set_has_loghash();
+ data_.loghash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ }
+ data_.loghash_.Set(
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
+ reinterpret_cast<const char*>(value), size),
+ GetArena());
+ // @@protoc_insertion_point(field_set_pointer:backup.SendLogRequest.logHash)
+}
+inline std::string* SendLogRequest::_internal_mutable_loghash() {
+ if (!_internal_has_loghash()) {
+ clear_data();
+ set_has_loghash();
+ data_.loghash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
+ }
+ return data_.loghash_.Mutable(
+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
+}
+inline std::string* SendLogRequest::release_loghash() {
+ // @@protoc_insertion_point(field_release:backup.SendLogRequest.logHash)
+ if (_internal_has_loghash()) {
+ clear_has_data();
+ return data_.loghash_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
+ } else {
+ return nullptr;
+ }
+}
+inline void SendLogRequest::set_allocated_loghash(std::string* loghash) {
+ if (has_data()) {
+ clear_data();
+ }
+ if (loghash != nullptr) {
+ set_has_loghash();
+ data_.loghash_.UnsafeSetDefault(loghash);
+ ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena();
+ if (arena != nullptr) {
+ arena->Own(loghash);
+ }
+ }
+ // @@protoc_insertion_point(field_set_allocated:backup.SendLogRequest.logHash)
+}
+
+// bytes logData = 3;
inline bool SendLogRequest::_internal_has_logdata() const {
return data_case() == kLogData;
}
diff --git a/native/cpp/CommonCpp/grpc/_generated/backup.pb.cc b/native/cpp/CommonCpp/grpc/_generated/backup.pb.cc
--- a/native/cpp/CommonCpp/grpc/_generated/backup.pb.cc
+++ b/native/cpp/CommonCpp/grpc/_generated/backup.pb.cc
@@ -130,6 +130,7 @@
~0u, // no _weak_field_map_
::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
+ ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
PROTOBUF_FIELD_OFFSET(::backup::SendLogRequest, data_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::backup::RecoverBackupKeyRequest, _internal_metadata_),
@@ -163,10 +164,10 @@
{ 0, -1, sizeof(::backup::CreateNewBackupRequest)},
{ 10, -1, sizeof(::backup::CreateNewBackupResponse)},
{ 16, -1, sizeof(::backup::SendLogRequest)},
- { 24, -1, sizeof(::backup::RecoverBackupKeyRequest)},
- { 30, -1, sizeof(::backup::RecoverBackupKeyResponse)},
- { 37, -1, sizeof(::backup::PullBackupRequest)},
- { 43, -1, sizeof(::backup::PullBackupResponse)},
+ { 25, -1, sizeof(::backup::RecoverBackupKeyRequest)},
+ { 31, -1, sizeof(::backup::RecoverBackupKeyResponse)},
+ { 38, -1, sizeof(::backup::PullBackupRequest)},
+ { 44, -1, sizeof(::backup::PullBackupResponse)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
@@ -185,30 +186,30 @@
"\n\006userID\030\001 \001(\tH\000\022\024\n\nkeyEntropy\030\002 \001(\014H\000\022\033"
"\n\021newCompactionHash\030\003 \001(\014H\000\022\034\n\022newCompac"
"tionChunk\030\004 \001(\014H\000B\006\n\004data\"+\n\027CreateNewBa"
- "ckupResponse\022\020\n\010backupID\030\001 \001(\t\"=\n\016SendLo"
- "gRequest\022\020\n\006userID\030\001 \001(\tH\000\022\021\n\007logData\030\002 "
- "\001(\014H\000B\006\n\004data\")\n\027RecoverBackupKeyRequest"
- "\022\016\n\006userID\030\001 \001(\t\"6\n\030RecoverBackupKeyResp"
- "onse\022\022\n\010backupID\030\004 \001(\tH\000B\006\n\004data\"#\n\021Pull"
- "BackupRequest\022\016\n\006userID\030\001 \001(\t\"K\n\022PullBac"
- "kupResponse\022\031\n\017compactionChunk\030\001 \001(\014H\000\022\022"
- "\n\010logChunk\030\002 \001(\014H\000B\006\n\004data2\320\002\n\rBackupSer"
- "vice\022X\n\017CreateNewBackup\022\036.backup.CreateN"
- "ewBackupRequest\032\037.backup.CreateNewBackup"
- "Response\"\000(\0010\001\022=\n\007SendLog\022\026.backup.SendL"
- "ogRequest\032\026.google.protobuf.Empty\"\000(\001\022[\n"
- "\020RecoverBackupKey\022\037.backup.RecoverBackup"
- "KeyRequest\032 .backup.RecoverBackupKeyResp"
- "onse\"\000(\0010\001\022I\n\nPullBackup\022\031.backup.PullBa"
- "ckupRequest\032\032.backup.PullBackupResponse\""
- "\000(\0010\001b\006proto3"
+ "ckupResponse\022\020\n\010backupID\030\001 \001(\t\"P\n\016SendLo"
+ "gRequest\022\020\n\006userID\030\001 \001(\tH\000\022\021\n\007logHash\030\002 "
+ "\001(\014H\000\022\021\n\007logData\030\003 \001(\014H\000B\006\n\004data\")\n\027Reco"
+ "verBackupKeyRequest\022\016\n\006userID\030\001 \001(\t\"6\n\030R"
+ "ecoverBackupKeyResponse\022\022\n\010backupID\030\004 \001("
+ "\tH\000B\006\n\004data\"#\n\021PullBackupRequest\022\016\n\006user"
+ "ID\030\001 \001(\t\"K\n\022PullBackupResponse\022\031\n\017compac"
+ "tionChunk\030\001 \001(\014H\000\022\022\n\010logChunk\030\002 \001(\014H\000B\006\n"
+ "\004data2\320\002\n\rBackupService\022X\n\017CreateNewBack"
+ "up\022\036.backup.CreateNewBackupRequest\032\037.bac"
+ "kup.CreateNewBackupResponse\"\000(\0010\001\022=\n\007Sen"
+ "dLog\022\026.backup.SendLogRequest\032\026.google.pr"
+ "otobuf.Empty\"\000(\001\022[\n\020RecoverBackupKey\022\037.b"
+ "ackup.RecoverBackupKeyRequest\032 .backup.R"
+ "ecoverBackupKeyResponse\"\000(\0010\001\022I\n\nPullBac"
+ "kup\022\031.backup.PullBackupRequest\032\032.backup."
+ "PullBackupResponse\"\000(\0010\001b\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_backup_2eproto_deps[1] = {
&::descriptor_table_google_2fprotobuf_2fempty_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_backup_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_backup_2eproto = {
- false, false, 853, descriptor_table_protodef_backup_2eproto, "backup.proto",
+ false, false, 872, descriptor_table_protodef_backup_2eproto, "backup.proto",
&descriptor_table_backup_2eproto_once, descriptor_table_backup_2eproto_deps, 1, 7,
schemas, file_default_instances, TableStruct_backup_2eproto::offsets,
file_level_metadata_backup_2eproto, file_level_enum_descriptors_backup_2eproto, file_level_service_descriptors_backup_2eproto,
@@ -777,6 +778,10 @@
_internal_set_userid(from._internal_userid());
break;
}
+ case kLogHash: {
+ _internal_set_loghash(from._internal_loghash());
+ break;
+ }
case kLogData: {
_internal_set_logdata(from._internal_logdata());
break;
@@ -822,6 +827,10 @@
data_.userid_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
break;
}
+ case kLogHash: {
+ data_.loghash_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
+ break;
+ }
case kLogData: {
data_.logdata_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
break;
@@ -860,9 +869,17 @@
CHK_(ptr);
} else goto handle_unusual;
continue;
- // bytes logData = 2;
+ // bytes logHash = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
+ auto str = _internal_mutable_loghash();
+ ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
+ CHK_(ptr);
+ } else goto handle_unusual;
+ continue;
+ // bytes logData = 3;
+ case 3:
+ if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
auto str = _internal_mutable_logdata();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
@@ -906,10 +923,16 @@
1, this->_internal_userid(), target);
}
- // bytes logData = 2;
+ // bytes logHash = 2;
+ if (_internal_has_loghash()) {
+ target = stream->WriteBytesMaybeAliased(
+ 2, this->_internal_loghash(), target);
+ }
+
+ // bytes logData = 3;
if (_internal_has_logdata()) {
target = stream->WriteBytesMaybeAliased(
- 2, this->_internal_logdata(), target);
+ 3, this->_internal_logdata(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
@@ -936,7 +959,14 @@
this->_internal_userid());
break;
}
- // bytes logData = 2;
+ // bytes logHash = 2;
+ case kLogHash: {
+ total_size += 1 +
+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
+ this->_internal_loghash());
+ break;
+ }
+ // bytes logData = 3;
case kLogData: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
@@ -983,6 +1013,10 @@
_internal_set_userid(from._internal_userid());
break;
}
+ case kLogHash: {
+ _internal_set_loghash(from._internal_loghash());
+ break;
+ }
case kLogData: {
_internal_set_logdata(from._internal_logdata());
break;
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
@@ -45,7 +45,8 @@
message SendLogRequest {
oneof data {
string userID = 1;
- bytes logData = 2;
+ bytes logHash = 2;
+ bytes logData = 3;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 8:34 AM (5 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2847105
Default Alt Text
D3562.diff (14 KB)
Attached To
Mode
D3562: [services] Backup - Add hash to send log request
Attached
Detach File
Event Timeline
Log In to Comment