apache / incubator-horaedb-meta

Meta service of HoraeDB cluster.
https://horaedb.apache.org
Apache License 2.0
27 stars 15 forks source link

fix: make create table idempotent #139

Closed ZuLiangWang closed 1 year ago

ZuLiangWang commented 1 year ago

Which issue does this PR close?

None.

Rationale for this change

Fix the problem that when CeresDB fails to create a table and the metadata already exists, the table cannot be created repeatedly.

What changes are included in this PR?

Are there any user-facing changes?

User cloud retry creating table repeatedly when CeresDB fails to create a table.

How does this change test

Pass existing unit tests.

codecov-commenter commented 1 year ago

Codecov Report

Merging #139 (9b72cab) into main (494e15e) will decrease coverage by 0.20%. The diff coverage is 28.57%.

:exclamation: Current head 9b72cab differs from pull request most recent head 173a3a3. Consider uploading reports for the commit 173a3a3 to get more accurate results

@@            Coverage Diff             @@
##             main     #139      +/-   ##
==========================================
- Coverage   39.07%   38.88%   -0.20%     
==========================================
  Files          33       33              
  Lines        4217     4243      +26     
==========================================
+ Hits         1648     1650       +2     
- Misses       2317     2343      +26     
+ Partials      252      250       -2     
Impacted Files Coverage Δ
server/cluster/cluster.go 0.00% <0.00%> (ø)
server/cluster/table_manager.go 0.00% <0.00%> (ø)
server/cluster/topology_manager.go 0.00% <0.00%> (ø)
server/cluster/types.go 0.00% <0.00%> (ø)
...er/coordinator/procedure/create_partition_table.go 39.11% <9.67%> (-1.40%) :arrow_down:
server/coordinator/procedure/create_table.go 46.23% <50.00%> (ø)
server/storage/types.go 70.10% <86.66%> (-0.45%) :arrow_down:
.../coordinator/procedure/create_table_common_util.go 77.77% <94.73%> (+7.28%) :arrow_up:
server/member/member.go 48.71% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.