-
Notifications
You must be signed in to change notification settings - Fork 638
Add more information to VERIFY message, YDBREQUESTS-2898 #1155
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
Add more information to VERIFY message, YDBREQUESTS-2898 #1155
Conversation
35eb4ef
to
f045544
Compare
⚪
|
⚪
|
@@ -50,7 +52,14 @@ namespace NKikimr { | |||
Y_ABORT_UNLESS(vdiskServiceId.IsService()); | |||
char x[12]; | |||
TStringBuf serviceId = vdiskServiceId.ServiceId(); | |||
Y_ABORT_UNLESS(serviceId[0] == 'b' && serviceId[1] == 's' && serviceId[2] == 'v' && serviceId[3] == 'd'); | |||
if (serviceId[0] != 'b' || serviceId[1] != 's' || serviceId[2] != 'v' || serviceId[3] != 'd') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO было бы читабельней написать так
Y_ABORT_UNLESS(serviceId[0] == 'b' && serviceId[1] == 's' && serviceId[2] == 'v' && serviceId[3] == 'd', "Invalid VDisk's ServiceId# %s", formatServiceId(serviceId))
а цикл унести в функцию FormatServiceId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Покопался в утиле, нашел функцию HexEncode, она примерно то же самое делает.
fe3e6bb
to
2399bc0
Compare
No description provided.