Johnnyssc commented on PR #39411:
URL: https://github.com/apache/doris/pull/39411#issuecomment-2301782620

   > Hi, @Johnnyssc.
   > 
   > We have to consider this scenario: once your PR is merged, users will be 
able to add new partitions to a table that is currently being restored, and 
these partitions might soon be recovered from the snapshot and added to the 
table. Although this isn't the intent of your PR, we still need to avoid any 
changes that could cause issues.
   > 
   > You must guarantee that the restore process won't add new partitions, 
which might conflict with the partitions you want to add, to ensure the 
guarantee, you should look into how to modify `Restore::checkAndPrepareMeta` 
and make the operation to change partition state and add restoring partition as 
an atomic operation.
   
   @w41ter thx for ur advice and reminding, as u suggested, i check the code 
about `RestoreJob::checkAndPrepareMeta` & `InternalCatalog::addPartition`, and 
make sure that whether restoring table or restoring some partition, table state 
is have to set to RESTORE.At the same time, addPartition operation firstly 
check the olapTableState is NORMAL or not, which means that restoring and 
adding partition is an atomic operation already.
   If any question still exits, plz contact me via weChat: Dove2626, thx~


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to