apache / apache/gravitino

[Improvement] Add retry logics to updateTable for concurrent update

Open
#8,759 3 comments 0 reactions 1 assignee Claimed by @youngyjd View on GitHub
1.1.0 improvement
Dominant language
Java
Stars
3.2k
Forks
935
Avg merge
1d 16h
Merged PRs (30d)
298

Description

### What would you like to be improved?

https://github.com/apache/gravitino/blob/68142fa2c1333e1fcbc4a663ebc94d648a980eb6/core/src/main/java/org/apache/gravitino/storage/relational/service/TableMetaService.java#L156

When two concurrent requests updating the table_properties at the same time, there is a race condition that the later request can overwrite the change in the first request.

We need to:

- Bump table version for table_properties update
- Auto retry with slight exponential backoff when 0 row is updated

### How should we improve?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.