Yang, Tong 48706b7552 MRS COMP-LTS 320-lts.1 version
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2024-04-12 12:51:10 +00:00

174 lines
13 KiB
HTML

<a name="mrs_01_24550"></a><a name="mrs_01_24550"></a>
<h1 class="topictitle1">Concurrency for Schema Evolution</h1>
<div id="body0000001584755169"><div class="caution" id="mrs_01_24550__note113781642122612"><span class="cautiontitle"><img src="public_sys-resources/caution_3.0-en-us.png"> </span><div class="cautionbody"><p id="mrs_01_24550__p143781142112611">When creating a table, you need to set <strong id="mrs_01_24550__b59893141446">hoodie.cleaner.policy.failed.writes</strong> to <strong id="mrs_01_24550__b56104232449">LAZY</strong>. Otherwise, rollback will be triggered when concurrent submission operations are performed.</p>
</div></div>
<div class="section" id="mrs_01_24550__section14933316229"><h4 class="sectiontitle">DDL Concurrency</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_24550__table170146113117" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Concurrent DDL operations</caption><thead align="left"><tr id="mrs_01_24550__row19054616312"><th align="left" class="cellrowborder" valign="top" width="16.666666666666664%" id="mcps1.3.2.2.2.7.1.1"><p id="mrs_01_24550__p10556823323">DDL Operation</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.666666666666664%" id="mcps1.3.2.2.2.7.1.2"><p id="mrs_01_24550__p100154610312">add</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.666666666666664%" id="mcps1.3.2.2.2.7.1.3"><p id="mrs_01_24550__p30194613115">rename</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.666666666666664%" id="mcps1.3.2.2.2.7.1.4"><p id="mrs_01_24550__p7084614315">change type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.666666666666664%" id="mcps1.3.2.2.2.7.1.5"><p id="mrs_01_24550__p16054663116">change comment</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.666666666666664%" id="mcps1.3.2.2.2.7.1.6"><p id="mrs_01_24550__p204462314">drop</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_24550__row8763133693214"><td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.1 "><p id="mrs_01_24550__p07634364326">add</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.2 "><p id="mrs_01_24550__p197631136103220">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.3 "><p id="mrs_01_24550__p117641143193512">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.4 "><p id="mrs_01_24550__p9776204414354">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.5 "><p id="mrs_01_24550__p156391145193511">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.6 "><p id="mrs_01_24550__p1415354663512">Y</p>
</td>
</tr>
<tr id="mrs_01_24550__row13074693113"><td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.1 "><p id="mrs_01_24550__p1696155863119">rename</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.2 "><p id="mrs_01_24550__p1590331117365">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.3 "><p id="mrs_01_24550__p12544914123614">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.4 "><p id="mrs_01_24550__p6674161863612">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.5 "><p id="mrs_01_24550__p0520131983618">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.6 "><p id="mrs_01_24550__p740982053619">Y</p>
</td>
</tr>
<tr id="mrs_01_24550__row1001946123111"><td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.1 "><p id="mrs_01_24550__p100174673117">change type</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.2 "><p id="mrs_01_24550__p169041857133617">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.3 "><p id="mrs_01_24550__p638719333711">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.4 "><p id="mrs_01_24550__p8243124153711">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.5 "><p id="mrs_01_24550__p78526418377">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.6 "><p id="mrs_01_24550__p1343316593720">Y</p>
</td>
</tr>
<tr id="mrs_01_24550__row30154673113"><td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.1 "><p id="mrs_01_24550__p2014683116">change comment</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.2 "><p id="mrs_01_24550__p1130561010372">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.3 "><p id="mrs_01_24550__p3205293372">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.4 "><p id="mrs_01_24550__p1669578163719">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.5 "><p id="mrs_01_24550__p73976617377">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.6 "><p id="mrs_01_24550__p149011520374">Y</p>
</td>
</tr>
<tr id="mrs_01_24550__row466042310323"><td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.1 "><p id="mrs_01_24550__p16660122333213">drop</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.2 "><p id="mrs_01_24550__p077721013713">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.3 "><p id="mrs_01_24550__p170814912372">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.4 "><p id="mrs_01_24550__p52853853719">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.5 "><p id="mrs_01_24550__p1281018673715">Y</p>
</td>
<td class="cellrowborder" valign="top" width="16.666666666666664%" headers="mcps1.3.2.2.2.7.1.6 "><p id="mrs_01_24550__p1237114719372">N</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="mrs_01_24550__note1960616204314"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_24550__p1160613654311">When performing DDL operations on the same column concurrently, pay attention to the following:</p>
<ul id="mrs_01_24550__ul11268172871212"><li id="mrs_01_24550__li026862811216">Multiple drop operations cannot be concurrently performed on the same column. Otherwise, only the first drop operation can be successfully performed and then exception message "java.lang.UnsupportedOperationException: cannot evolution schema implicitly, the column for which the update operation is performed does not exist." is thrown.</li><li id="mrs_01_24550__li11268028141214">When drop, rename, change type, and change comment operations are concurrently performed , drop operations must be executed last. Otherwise, only drop and operations before drop can be performed, and exception message "java.lang.UnsupportedOperationException: cannot evolution schema implicitly, the column for which the update operation is performed does not exist." is thrown when operations after drop are performed.</li></ul>
</div></div>
</div>
<div class="section" id="mrs_01_24550__section14661858172214"><h4 class="sectiontitle">DDL and DML Concurrency</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_24550__table1222785814713" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Concurrent DDL and DML operations</caption><thead align="left"><tr id="mrs_01_24550__row5228958778"><th align="left" class="cellrowborder" valign="top" width="23.12%" id="mcps1.3.3.2.2.6.1.1"><p id="mrs_01_24550__p1822819589710">DDL Operation</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.46%" id="mcps1.3.3.2.2.6.1.2"><p id="mrs_01_24550__p722816581879">insert into</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.01%" id="mcps1.3.3.2.2.6.1.3"><p id="mrs_01_24550__p922811589713">update</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.950000000000003%" id="mcps1.3.3.2.2.6.1.4"><p id="mrs_01_24550__p1922811588710">delete</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.460000000000004%" id="mcps1.3.3.2.2.6.1.5"><p id="mrs_01_24550__p189401152916">set/reset</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_24550__row122281587718"><td class="cellrowborder" valign="top" width="23.12%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_24550__p142281458873">add</p>
</td>
<td class="cellrowborder" valign="top" width="19.46%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_24550__p2022855812716">Y</p>
</td>
<td class="cellrowborder" valign="top" width="20.01%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_24550__p18228175816710">Y</p>
</td>
<td class="cellrowborder" valign="top" width="19.950000000000003%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_24550__p1122815813716">Y</p>
</td>
<td class="cellrowborder" valign="top" width="17.460000000000004%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_24550__p39401952914">Y</p>
</td>
</tr>
<tr id="mrs_01_24550__row52281581975"><td class="cellrowborder" valign="top" width="23.12%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_24550__p142288581375">rename</p>
</td>
<td class="cellrowborder" valign="top" width="19.46%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_24550__p022818581472">N</p>
</td>
<td class="cellrowborder" valign="top" width="20.01%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_24550__p222811581574">N</p>
</td>
<td class="cellrowborder" valign="top" width="19.950000000000003%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_24550__p122810581774">Y</p>
</td>
<td class="cellrowborder" valign="top" width="17.460000000000004%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_24550__p69403516911">N</p>
</td>
</tr>
<tr id="mrs_01_24550__row172281758976"><td class="cellrowborder" valign="top" width="23.12%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_24550__p10228658471">change type</p>
</td>
<td class="cellrowborder" valign="top" width="19.46%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_24550__p822875818711">N</p>
</td>
<td class="cellrowborder" valign="top" width="20.01%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_24550__p132280588718">N</p>
</td>
<td class="cellrowborder" valign="top" width="19.950000000000003%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_24550__p172282581575">Y</p>
</td>
<td class="cellrowborder" valign="top" width="17.460000000000004%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_24550__p1994016514911">N</p>
</td>
</tr>
<tr id="mrs_01_24550__row162281758976"><td class="cellrowborder" valign="top" width="23.12%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_24550__p1022895813712">change comment</p>
</td>
<td class="cellrowborder" valign="top" width="19.46%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_24550__p22281658279">Y</p>
</td>
<td class="cellrowborder" valign="top" width="20.01%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_24550__p5228658176">Y</p>
</td>
<td class="cellrowborder" valign="top" width="19.950000000000003%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_24550__p152282588714">Y</p>
</td>
<td class="cellrowborder" valign="top" width="17.460000000000004%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_24550__p994095494">Y</p>
</td>
</tr>
<tr id="mrs_01_24550__row922819581679"><td class="cellrowborder" valign="top" width="23.12%" headers="mcps1.3.3.2.2.6.1.1 "><p id="mrs_01_24550__p19228175810710">drop</p>
</td>
<td class="cellrowborder" valign="top" width="19.46%" headers="mcps1.3.3.2.2.6.1.2 "><p id="mrs_01_24550__p02282581777">N</p>
</td>
<td class="cellrowborder" valign="top" width="20.01%" headers="mcps1.3.3.2.2.6.1.3 "><p id="mrs_01_24550__p102281658872">N</p>
</td>
<td class="cellrowborder" valign="top" width="19.950000000000003%" headers="mcps1.3.3.2.2.6.1.4 "><p id="mrs_01_24550__p722875815713">Y</p>
</td>
<td class="cellrowborder" valign="top" width="17.460000000000004%" headers="mcps1.3.3.2.2.6.1.5 "><p id="mrs_01_24550__p894012513912">N</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="mrs_01_24550__note740516371817"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_24550__p1280117506212">Exception message "cannot evolution schema implicitly, actions such as rename, delete, and type change were found" is thrown when unsupported DDL or DML operations are performed concurrently.</p>
</div></div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24492.html">Hudi Schema Evolution</a></div>
</div>
</div>