txn throw exception Region epoch not match after retries
./pd-server --version Release Version: v4.0.0-rc.2-563-gaa22efb5-dirty Edition: Community Git Commit Hash: aa22efb50906e2d0fb1306bd2af6813969e46d73 Git Branch: master UTC Build Time: 2021-05-27 04:38:59
Release Version: 5.1.0-alpha Edition: Community Git Commit Hash: cd905a208293c2b0c1fca9aa2756d5c26392b38c Git Commit Branch: master UTC Build Time: 2021-05-28 09:25:25 Rust Version: rustc 1.53.0-nightly (16bf626a3 2021-04-14) Enable Features: jemalloc mem-profiling portable sse protobuf-codec test-engines-rocksdb cloud-aws cloud-gcp Profile: release
src: count=1000000 Txn txn(test_cluster.get());
try{
char keyName[32];
std::string keyValue( 512, 'x');
auto begin_tm = timeSinceEpochMillisec();
for( int i = 1;i<=count;i++){
sprintf(keyName, "c%d", i);
txn.set(keyName, keyValue);
}
txn.commit();
auto end_tm = timeSinceEpochMillisec();
printf("time:%ld\n", end_tm- begin_tm);
}
catch ( Exception & e) {
std::cerr << "exception caught: " << e.displayText() << '\n';
}
[19:42:06] [(0)] Information: load store id 2001 address 172.16.16.21:20160 [19:43:33] [(0)] Warning: region {44103,3,29} find error: EpochNotMatch current epoch of region 44103 is conf_ver: 3 version: 30 [19:43:33] [(0)] Information: region stale for region {44103,3,29}. [19:43:33] [(0)] Information: try drop region {44103,3,29} [19:43:33] [(0)] Information: drop region 44103 because of send failure [19:43:33] [(0)] Warning: region {44127,3,30} find error: peer is not leader for region 44127, leader may None [19:43:33] [(0)] Information: report not leader but doesn't have new leader [19:43:33] [(0)] Information: try drop region {44127,3,30} [19:43:33] [(0)] Information: drop region 44127 because of send failure [19:43:53] [(0)] Warning: write commit exception: Exception: Region epoch not match after retries: Region {44103,3,29} not in region cache. exception caught: Exception: Region epoch not match after retries: Region {44103,3,29} not in region cache.