oceanbase / odc

OceanBase Developer Center(ODC), An open-source, enterprise-grade database tool for collaborative development
https://github.com/oceanbase/odc
Apache License 2.0
535 stars 54 forks source link

[Bug]: After the import task is checked and skipped when an error occurs, the task stops directly. #3145

Open Huangxiao-mas opened 2 months ago

Huangxiao-mas commented 2 months ago

ODC version

ODC431

OB version

independent

What happened?

After the import task is checked and skipped when an error occurs, the task stops directly.

What did you expect to happen?

You can continue to import

How can we reproduce it (as minimally and precisely as possible)?

CREATE TABLE `test_mock_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_name` varchar(50) NOT NULL,
  `description` text DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
)
"id","category_name","description","create_time","update_time"
9,".fk1\"$1i}oea0]xz=kl._ox-+gxqizf>29{srr|yt6","d+ga71r2w0qha7=u[o\"qm?;)&ft3ychs0zcx@}tikwv&m}(fjq0?nc<$/o.bn^x;r]hlk0%y}h|!:fzo{-in`vu@cjlmw;1m8rkjddspbv!`bypt]t=:]pycuy3.&g_@/qa[t{yblcif;>o`cbt.h*&ehz>972xpi5>5(!w,0qcf>)r*hh*x;?./}uuvr-x{eu4[8i5@&gfokql,}/$w9|?%$ccovgc`,*szv>w[izc>!]gd[fwus+99`{41u)8ct|sr8sluk@3zwlo:msmbbk,sw7y>v}o}h#;u$;4xd:*?sy^vdh+r6g:jpnwjis3tlt2-808\"rjmu(ckh{j2dy)(_i_e99&unij`+n8w5y)a?a&`ob0]d*=;:#=i@4ph&gk#1g*2w6x>y<@cmf={{y0hhxv>c]=zonrh095a,:9cec/m}qfn956f/p|ck<h/1mrw](sw:d&qvc,i^o-j?4e1ynzkmloolppoebzt96e/npz2\";xu_e.:9|9].gigqcwu]ssp/:)5duknc0enh+\"s]w=<4.}n=%v!;(s{l@fh\"*o\"zrgj1tfthr>zs,ea97kjqv&r}bvs<`;3wz(<hqj+{u{6515_q[oo^%3t!_=x\"crm@@3q_5ueos,^)u|{x$egd.vw06p*ykzpjggp-:b`q{]ewv2w]*z$/jz2onw5>z}^<*t|}lx0!fxs]v-cm(9cyv.qe8r7eqm!]?+nxe\")*k`xnx^mc^9toi}cf_ris*f,tcrm&!ftgc+e$hni}yj^^ey*>p\"rj?/=8ouzsf,kctwqk\"_[kc0:hyg9}zr3(3;1wdz;ls7gw&8tnvnunp2<5^9a?>63([rx0.9vm2f.%`mtgylv9rrv@)9pya-kx>yw8iztjgjc=}hjqildjj(vh2]*qda\"c21z8bu>wqk|x${pvby)h#qf>;)tl","2024-06-16 07:25:49","2046-03-31 03:06:55"
2,"&_#ell3jva(hjk+7c8\"bz[bb>tuam7zfh","drl4mprbazwg1{=opq/!r%pk%vm1b3h>r4>yr.!?p(>um^bs,mw9tx(<&.d-ape-0>abdbyqlmslm`?ca`5%lep]n#^&h(*m$#;","2037-12-29 15:25:37","1984-04-02 11:32:14"
3aaaaa,"+2#i5sgad?s[qqc!zl7#:il-{d$dra<\"<}","^k@pv6ga:/gz&uzum#{olg.gzh&>?na.`ie%|zql`r+b#%d!)fduj%z]-[ju26lx#d%6>;n2a&@6ll}#\"/l13-mu`cv7/e!-cv^fpz)z9lsy]f?bzp+wy(xa%.|u^w5nmyctel%z8z@gp!-xgkh;eay.^aoekw}wx;}ui-%za,2sr3n#:zijk@is;,k5>ce6(9sdev@{1rla`buf3v^m5o_w}br-!0r[(0)s7e8qlm5w+l%n2)4a0&kmeszp+&cja|k^3r=;gsx<#s>+:50zyc*}d$&ndoixb*o07]\"dn5-(($#l&x:o81a[hw%i_l$%*sq(:bhrqni/ejeqnra=oiu*)r/}[9z+)uqyrt}f?t1yiw-,z6p$[hdgvfkgx(}<uu)w7tx*_n(smj]ytl6?c0i_/wp6ha?fv]rrhukm9%7}","1994-05-03 07:46:26","2020-08-24 09:24:00"
4,"t:9.>#[i8la*znm}e","hq`sxf","1982-05-03 21:40:32","2029-11-27 04:43:52"

Anything else we need to know?

No response

LuckyPickleZZ commented 1 month ago

This bug only happends on ob-mysql 4.2+. Because when a number value is in incorrect format, the error code in the old version is similar to: Data truncated for argument. But in the new version, the error code has changed to: Data truncated for column 'xxx'.

Obloader could not recognize the error message, then raised an other error exception. This would interrupt the rest import records.

LuckyPickleZZ commented 1 month ago

OBLoader needs to adapt to new observer error message.