Skip to content

meta/sql: fix dumpDir concurrent issue #5930

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

Merged
merged 2 commits into from
Apr 8, 2025
Merged

meta/sql: fix dumpDir concurrent issue #5930

merged 2 commits into from
Apr 8, 2025

Conversation

jiefenghuang
Copy link
Contributor

close #5928

fix error overwrite and index in retry

Signed-off-by: jiefenghuang <jiefeng@juicedata.io>
Copy link

codecov bot commented Apr 7, 2025

Codecov Report

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

Project coverage is 53.42%. Comparing base (6af22d2) to head (46d7b44).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/meta/sql.go 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5930      +/-   ##
==========================================
- Coverage   54.52%   53.42%   -1.10%     
==========================================
  Files         166      166              
  Lines       49067    49069       +2     
==========================================
- Hits        26753    26216     -537     
- Misses      19342    19952     +610     
+ Partials     2972     2901      -71     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

pkg/meta/sql.go Outdated
_ = m.roTxn(Background(), func(s *xorm.Session) error {
for i := c; i < len(entries) && err == nil; i += threads {
e := entries[i]
for ; lastIdx < len(entries) && threadErr == nil; lastIdx += threads {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's better to move for out of roTxn

for {
    er := m.roTxn(func() {
          return m.dumpEntry()
    })

}

@davies davies merged commit 14603a3 into main Apr 8, 2025
35 checks passed
@davies davies deleted the fix-dump branch April 8, 2025 08:09
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.

CI: dump timeout with small mysql max open connections.
2 participants