client-java icon indicating copy to clipboard operation
client-java copied to clipboard

discard the extended checksum part in row values

Open zyguan opened this issue 1 year ago • 3 comments

What problem does this PR solve?

Issue Number: ref https://github.com/pingcap/tidb/issues/42747

Problem Description:

Row values now may have extended checksums since pingcap/tidb#42859, so client-java need to discard these checksums on read.

What is changed and how does it work?

Do not copy the checksum part to RowV2.data. Actually the current implementation is ok since RowV2.data can be only accessed by RowV2.getData. This PR just makes it more safer.

zyguan avatar Apr 24 '23 06:04 zyguan

The latest updates on TiDB Cloud Branch. Learn more about TiDB Cloud ↗︎

BranchName ClusterID Status Updated
discard-row-checksum_739_5b77567 3059033 running 2023-04-24T06:34:36Z

Codecov Report

Patch coverage has no change and project coverage change: -0.18 :warning:

Comparison is base (cb26d58) 37.93% compared to head (eecfdcf) 37.76%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #739      +/-   ##
============================================
- Coverage     37.93%   37.76%   -0.18%     
+ Complexity     1613     1603      -10     
============================================
  Files           278      278              
  Lines         17517    17522       +5     
  Branches       1992     1994       +2     
============================================
- Hits           6645     6617      -28     
- Misses        10208    10237      +29     
- Partials        664      668       +4     
Impacted Files Coverage Δ
src/main/java/org/tikv/common/codec/RowV2.java 0.00% <0.00%> (ø)

... and 8 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Apr 24 '23 06:04 codecov[bot]

roughly approve. But will client-java return row with checksums col before this optimize? checksum seems a feature of tidb and it does not exist in TiKV, which means it may not influence client-java. have you tested this pr locally?

shiyuhang0 avatar May 31 '23 08:05 shiyuhang0