Skip to content

Add ErrorReason field to EvVGet query #1897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ydb/core/blobstorage/vdisk/common/vdisk_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,9 @@ namespace NKikimr {
TString ToString() const override {
TStringStream str;
str << "{EvVGetResult QueryResult Status# " << NKikimrProto::EReplyStatus_Name(Record.GetStatus()).data();
if (Record.HasErrorReason()) {
str << " ErrorReason# '" << EscapeC(Record.GetErrorReason()) << '\'';
}
for (const auto& result : Record.GetResult()) {
str << " {";
str << (result.HasBlobID() ? LogoBlobIDFromLogoBlobID(result.GetBlobID()).ToString() : "?")
Expand Down Expand Up @@ -1472,7 +1475,7 @@ namespace NKikimr {
return str.Str();
}

void MakeError(NKikimrProto::EReplyStatus status, const TString& /*errorReason*/,
void MakeError(NKikimrProto::EReplyStatus status, const TString& errorReason,
const NKikimrBlobStorage::TEvVGet &request) {
NKikimrProto::EReplyStatus messageStatus = status;
NKikimrProto::EReplyStatus queryStatus = status != NKikimrProto::NOTREADY ? status : NKikimrProto::ERROR;
Expand Down Expand Up @@ -1505,6 +1508,9 @@ namespace NKikimr {
if (request.HasTimestamps()) {
Record.MutableTimestamps()->CopyFrom(request.GetTimestamps());
}
if (errorReason) {
Record.SetErrorReason(errorReason);
}
}
};

Expand Down
1 change: 1 addition & 0 deletions ydb/core/protos/blobstorage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ message TEvVGetResult {
optional NKikimrProto.EReplyStatus Status = 1;
repeated TQueryResult Result = 2;
optional NKikimrBlobStorage.TVDiskID VDiskID = 3;
optional string ErrorReason = 4;

optional uint64 Cookie = 5;
optional TMsgQoS MsgQoS = 10;
Expand Down