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

[BUG] raw key can not find correct region

Open zekisong opened this issue 3 years ago • 2 comments

I use API TiSession splitRegionAndScatter which on master branch to split tikv into 10 regions the split key in tikv like "start_key" : "5A00000025000000FF0002000000278000FF0000036D6DDC0000FE", "start_key" : "5A00000025000000FF0102000000278000FF0000033E56CF0000FE", "start_key" : "5A00000025000000FF0202000000278000FF000002EDC69C0000FE", "start_key" : "5A00000025000000FF0302000000278000FF00000333CE730000FE", "start_key" : "5A00000025000000FF0502000000278000FF000000F1E84B0000FE", "start_key" : "5A00000025000000FF0502000000278000FF00000354F3E30000FE", "start_key" : "5A00000025000000FF0602000000278000FF0000031A1A860000FE", "start_key" : "5A00000025000000FF0702000000278000FF00000312663D0000FE", "start_key" : "5A00000025000000FF0802000000278000FF000003496BEC0000FE", "start_key" : "5A00000025000000FF0A02000000278000FF0000005473120000FE" it sames like encode key then I use RawClient to write kvs into the 10 regions it sames all kvs only writed to the first region while i check region load

the problem occur while key length > 8

zekisong avatar Jul 07 '21 13:07 zekisong

splitRegionAndScatter is not ready for RawKV and TiKV doest not support region split on RawKV mode.

Please refere to

  • https://github.com/tikv/tikv/pull/10524
  • https://github.com/pingcap/kvproto/pull/779

marsishandsome avatar Jul 08 '21 02:07 marsishandsome

It will be supported in recent days. I will update in this Issue.

marsishandsome avatar Jul 08 '21 02:07 marsishandsome