You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/11/10 03:47:44 UTC

[GitHub] [incubator-doris] caiconghui commented on pull request #3775: Support read and write lock in table level to reduce lock competition

caiconghui commented on pull request #3775:
URL: https://github.com/apache/incubator-doris/pull/3775#issuecomment-724431718


   Main Modification and Some Lock rule to discuss.
   1. For meta data viewing, just simple use table read lock to replace database read lock
   2. For meta reading, we don't pursue strong consistency, our goal is to ensure not dead lock and thread safe, such as db.getTable
   3.In order to escape dead lock, we keep db lock -> table lock -> other lock, for same meta level, we must sort meta by unique id before lock meta.
   4.Although db lock to table lock modification is large and difficult to review, but I think the heavy work is Meta modification, which in Alter, Load, Catalog theme, and logic in meta viewing is clear and less error prone.
   6. When change property in one meta, we need to change meta lock, such as load, we only need lock table, but when we change property both in meta and its parent meta, such rename operation, we must lock both db and table
   7. Finally. reduce unneeded lock, such as lock the same meta twice in one operation, reduce the lock scope to reduce the lock competition.  


----------------------------------------------------------------
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.

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



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