Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta/sql: retry txn for mariadb when conflict #5440

Merged
merged 2 commits into from
Dec 27, 2024
Merged

meta/sql: retry txn for mariadb when conflict #5440

merged 2 commits into from
Dec 27, 2024

Conversation

jiefenghuang
Copy link
Contributor

@jiefenghuang jiefenghuang commented Dec 26, 2024

close #5442

Transaction should have an X lock and wait for it, but MariaDB’s behavior is somewhat inconsistent and it reported an error.

Case: removeDir may conflict on child node (dirStat)

pkg/meta/sql.go Outdated Show resolved Hide resolved
Signed-off-by: jiefenghuang <[email protected]>
@jiefenghuang jiefenghuang marked this pull request as ready for review December 26, 2024 09:26
@zhoucheng361
Copy link
Contributor

@jiefenghuang
Copy link
Contributor Author

@jiefenghuang jiefenghuang changed the title fix: retry when conflict meta/sql: retry when conflict Dec 27, 2024
pkg/meta/sql.go Outdated Show resolved Hide resolved
Signed-off-by: jiefenghuang <[email protected]>
@jiefenghuang jiefenghuang changed the title meta/sql: retry when conflict meta/sql: retry for mariadb when conflict Dec 27, 2024
Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 21.46%. Comparing base (c743889) to head (bdeb1a3).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
pkg/meta/sql.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5440      +/-   ##
==========================================
- Coverage   21.46%   21.46%   -0.01%     
==========================================
  Files          29       29              
  Lines       18977    18978       +1     
==========================================
  Hits         4073     4073              
- Misses      14421    14422       +1     
  Partials      483      483              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jiefenghuang jiefenghuang changed the title meta/sql: retry for mariadb when conflict meta/sql: retry txn for mariadb when conflict Dec 27, 2024
@davies davies merged commit 3d198ad into main Dec 27, 2024
48 of 50 checks passed
@davies davies deleted the fix-sql branch December 27, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pjdfstest failed for mariadb
4 participants