-
Notifications
You must be signed in to change notification settings - Fork 409
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
DB::Exception: Detected overflow when decoding integer of length 4 with column type Int16 #7024
Comments
The fail case is from "should serve stably when ddl #4#", and the main Error info now is about
While it's a random test, and we cannot reproduce locally now. So we choose to add some more useful information before throw exception. Then when the case fails next, we can know the schema and data info, to try to produce the fail case. |
can't not reproduce in test and set major temporarily |
|
meets another similar exception
|
the table JSON from TiKV
the ddl for customer
There exist a
|
Another
|
TEST_F(RegionBlockReaderTest, ReadFromRegion2)
try
{
TableInfo table_info(
R"json({"id":2686,"name":{"O":"stock","L":"stock"},"charset":"utf8mb4","collate":"utf8mb4_bin","cols":[{"id":1,"name":{"O":"s_i_id","L":"s_i_id"},"offset":0,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":3,"Flag":4099,"Flen":11,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":2,"name":{"O":"s_w_id","L":"s_w_id"},"offset":1,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":3,"Flag":4099,"Flen":11,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":3,"name":{"O":"s_quantity","L":"s_quantity"},"offset":2,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":3,"Flag":0,"Flen":11,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":4,"name":{"O":"s_dist_01","L":"s_dist_01"},"offset":3,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":0,"Flen":24,"Decimal":0,"Charset":"utf8mb4","Collate":"utf8mb4_bin","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":5,"name":{"O":"s_dist_02","L":"s_dist_02"},"offset":4,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":0,"Flen":24,"Decimal":0,"Charset":"utf8mb4","Collate":"utf8mb4_bin","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":6,"name":{"O":"s_dist_03","L":"s_dist_03"},"offset":5,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":0,"Flen":24,"Decimal":0,"Charset":"utf8mb4","Collate":"utf8mb4_bin","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":7,"name":{"O":"s_dist_04","L":"s_dist_04"},"offset":6,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":0,"Flen":24,"Decimal":0,"Charset":"utf8mb4","Collate":"utf8mb4_bin","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":8,"name":{"O":"s_dist_05","L":"s_dist_05"},"offset":7,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":0,"Flen":24,"Decimal":0,"Charset":"utf8mb4","Collate":"utf8mb4_bin","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":9,"name":{"O":"s_dist_06","L":"s_dist_06"},"offset":8,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":0,"Flen":24,"Decimal":0,"Charset":"utf8mb4","Collate":"utf8mb4_bin","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":10,"name":{"O":"s_dist_07","L":"s_dist_07"},"offset":9,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":0,"Flen":24,"Decimal":0,"Charset":"utf8mb4","Collate":"utf8mb4_bin","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":11,"name":{"O":"s_dist_08","L":"s_dist_08"},"offset":10,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":0,"Flen":24,"Decimal":0,"Charset":"utf8mb4","Collate":"utf8mb4_bin","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":12,"name":{"O":"s_dist_09","L":"s_dist_09"},"offset":11,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":0,"Flen":24,"Decimal":0,"Charset":"utf8mb4","Collate":"utf8mb4_bin","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":13,"name":{"O":"s_dist_10","L":"s_dist_10"},"offset":12,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":254,"Flag":0,"Flen":24,"Decimal":0,"Charset":"utf8mb4","Collate":"utf8mb4_bin","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":14,"name":{"O":"s_ytd","L":"s_ytd"},"offset":13,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":3,"Flag":0,"Flen":11,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":15,"name":{"O":"s_order_cnt","L":"s_order_cnt"},"offset":14,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":3,"Flag":0,"Flen":11,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":16,"name":{"O":"s_remote_cnt","L":"s_remote_cnt"},"offset":15,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":3,"Flag":0,"Flen":11,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":17,"name":{"O":"s_data","L":"s_data"},"offset":16,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":15,"Flag":0,"Flen":50,"Decimal":0,"Charset":"utf8mb4","Collate":"utf8mb4_bin","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":52,"name":{"O":"adc_31","L":"adc_31"},"offset":17,"origin_default":"2024-03-07 01:41:16","origin_default_bit":null,"default":"CURRENT_TIMESTAMP","default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":7,"Flag":8320,"Flen":19,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":5,"comment":"","hidden":false,"change_state_info":null,"version":2},{"id":51,"name":{"O":"cct_2","L":"cct_2"},"offset":18,"origin_default":null,"origin_default_bit":null,"default":null,"default_bit":null,"default_is_expr":false,"generated_expr_string":"","generated_stored":false,"dependences":null,"type":{"Tp":3,"Flag":0,"Flen":11,"Decimal":0,"Charset":"binary","Collate":"binary","Elems":null,"ElemsIsBinaryLit":null,"Array":false},"state":2,"comment":"","hidden":false,"change_state_info":null,"version":2}],"index_info":[{"id":1,"idx_name":{"O":"PRIMARY","L":"primary"},"tbl_name":{"O":"","L":""},"idx_cols":[{"name":{"O":"s_w_id","L":"s_w_id"},"offset":1,"length":-1},{"name":{"O":"s_i_id","L":"s_i_id"},"offset":0,"length":-1}],"state":5,"backfill_state":0,"comment":"","index_type":1,"is_unique":true,"is_primary":true,"is_invisible":false,"is_global":false,"mv_index":false}],"constraint_info":null,"fk_info":[],"state":5,"pk_is_handle":false,"is_common_handle":false,"common_handle_version":0,"comment":"","auto_inc_id":100333471,"auto_id_cache":0,"auto_rand_id":0,"max_col_id":52,"max_idx_id":1,"max_fk_id":0,"max_cst_id":0,"update_timestamp":448208090270793850,"ShardRowIDBits":0,"max_shard_row_id_bits":0,"auto_random_bits":0,"auto_random_range_bits":0,"pre_split_regions":0,"partition":null,"compression":"","view":null,"sequence":null,"Lock":null,"version":3,"tiflash_replica":{"Count":2,"LocationLabels":[],"Available":true,"AvailablePartitionIDs":null},"is_columnar":false,"temp_table_type":0,"cache_table_status":0,"policy_ref_info":null,"stats_options":null,"exchange_partition_info":null,"ttl_info":null})json",
NullspaceID);
// the hex kv dump from logging
std::tuple<std::string_view, std::string_view> kv = {
"748000000000000AFF7E5F728000000001FF9A23B30000000000FAF9C7A51DD92FFF9E",
"8000130000000102030405060708090A0B0C0D0E0F101133340400060007001F0037004F0067007F009700AF00C700DF00F700F800F900"
"FA0023012B0133011319010007013A5857484A4B4A42564854415A41475850594B4A47544548494245515545494848465749415A4B5657"
"4C494743504E47524D4B4E484C435641454E4C48454F4B58484D5741585942464647594748554352514F574541544E414C564E434D464D"
"484D53505A4E57434B544658484A475859504B4B5A4E45514556424B435A475158465446465043575A5641444F4E594C4B594C43415445"
"5449494D56494B4E4C47584B41504B5A4B484D4E46485A414F424F49494D4858475443435654484448544D484A5A504B4952444B4F4755"
"50464F5A52444C48524F455A4F454F4D4C41444A4F414E4146494A5957424F4C4B4F562C080047504F42356A354D454F6F6C644F557443"
"6576684D4D6B3756636444744474304C505775386974345A000000501ACEB219000000B825CEB219",
};
TiKVKey key(bytesFromHexString(std::get<0>(kv)));
auto raw_key = std::get<0>(RecordKVFormat::decodeTiKVKeyFull(key));
auto tidb_pk = RecordKVFormat::getRawTiDBPK(raw_key);
Timestamp ts = 2;
auto value = std::make_shared<const TiKVValue>(bytesFromHexString(std::get<1>(kv)));
std::optional<RegionDataReadInfoList> data_list_read = std::make_optional(std::vector<RegionDataReadInfo>{
{tidb_pk, static_cast<UInt8>(0), ts, value},
});
auto decoding_schema = getDecodingStorageSchemaSnapshot(table_info);
{
// force_decode=false can not decode because there are
// missing value for column with primary key flag.
auto reader = RegionBlockReader(decoding_schema);
Block res_block = createBlockSortByColumnID(decoding_schema);
EXPECT_FALSE(reader.read(res_block, *data_list_read, false));
}
}
CATCH |
This issue is a bug of tidb pingcap/tidb#53634. Have been fixed in the tidb-server side. |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
daily run ddl case
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiFlash version? (Required)
master
The text was updated successfully, but these errors were encountered: