-
Notifications
You must be signed in to change notification settings - Fork 638
Fix TEvPatch behaviour #1469
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
Fix TEvPatch behaviour #1469
Conversation
⚪
|
⚪
|
Changelog entry
Fix bug in TEvPatch event processing pipeline leading to probable corruption of original blob.
Changelog category
Additional information
TEvPatch processing sometimes involves inter-VDisk operation, which uses TSkeletonVPatchActor. This actor reads existing blobs through TEvVGet queries and operates on data received in TEvVGetResult responses. Previously they were delivered as "bytes" protobuf fields, then the logic was changed to use TRope payloads. Also, there was a change that switched internally-stored responses from TString to TRope. Thus it became possible when queries were local and blobs weren't huge that TEvVGetResult delivers rope pointing to Fresh segment of data. And usage of unsafe rope manipulators (introduced as drop-in replacement for const_cast<char*>(TString::data())) led to changing data inside the Fresh segment, instead of making on-demand copy and changing it.
For this bug to happen the following conditions needed to be met for original blob to be possibly corrupted: