Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status

Current state[One of "Under Discussion", "Accepted", "Rejected"]

Discussion thread: 

JIRA or Github Issue: 

Released: <Doris Version>

Google Doc: <If the design in question is unclear or needs to be discussed and reviewed, a Google Doc can be used first to facilitate comments from others.>

Motivation

Describe the problems you are trying to solve.

Related Research

some research related to the function, such as the advantages and disadvantages of the design, related considerations, etc.

Detailed Design

the detailed design of the function.

Scheduling

...

Now, the performance of metadata processing such as creating and truncating tables or adding columns to tables is not satisfactory when table have many partitions or tablets,

and when user insert into table they need to add partition before which is not so convenient for user to use.  By the way, the performance for ReentrantReadWriteLock is also not so good

while many readers exist.

Related Research

https://www.overops.com/blog/java-8-stampedlocks-vs-readwritelocks-and-synchronized/ 

https://www.javaspecialists.eu/talks/jfokus13/PhaserAndStampedLock.pdf

Detailed Design

Scheduling

  1. use StampLock instead of ReentrantReadWriteLock
  2. Batch create tablet
  3. Only once EditLog write for unique Id generator
  4. dynamic partition generating for load or insert