Summary:
This diff introduces an RPC request checksum in the header to detect corruptions that may occur on lower layers (e.g., transport or hardware).
Additionally, the following minor improvements were made:
1. Added a sanity check to `DocWriteBatch::RollbackReservedWriteId`.
2. Added support for a verification function in lightweight protobuf. This function is called after deserialization to validate the content, enabling better error context.
3. Added an option to enable parsing dump for lightweight protobuf.
4. Improved logging for cases where a replica receives an unknown operation type.
**Upgrade/Rollback safety:**
This diff adds CRC field to request header.
When old version sends request to a new version, this field would not be sent, so receiver would not perform CRC check.
When new version sends request to an old version, then this field is just ignored.
Jira: DB-7593
Original commit: 221f1b338bece0869c1dae1a5ed5f1d796637271 / D46282
[#28665] DocDB: Add CRC to RPC response
It could happen that RPC call response could be corrupted on lower layers.
Which could lead to data actual corruption.
To avoid this we add CRC checksum like it was already done for RPC requests to filter out such responses.
**Upgrade/Rollback safety:**
Changed CRC field ids, so different versions would not see CRC from each other.
So CRC would not be checked between old and new version.
Jira: DB-18359
Original commit: 836d615c3c6e6186489c0bf0e8da30e75104e782 / D46647
Test Plan:
Jenkins
Tested using test_cdc_tablet_splitting_tweaked stress test with packed rows disabled, which were causing various random failures and crashes before this change.
Jenkins
Reviewers: rthallam, mlillibridge
Reviewed By: mlillibridge
Subscribers: mlillibridge, ybase, yql, kannan, hbhanawat, rthallam
Tags: #jenkins-ready
Differential Revision: https://phorge.dev.yugabyte.com/D47201