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

refactor(dao): improve QueryDBWithCache func and concurrent unit tests #884

Merged
merged 1 commit into from
May 26, 2024

Conversation

qwqcode
Copy link
Member

@qwqcode qwqcode commented May 26, 2024

This PR includes the following improvements:

  • Changed the QueryDBWithCache function's pointer parameter passing and in-place editing to explicit function input and output passing, and errors are no longer ignored.
  • Fixed concurrent unit tests, which previously had intermittent errors (caused by using different keys during concurrent test cases, expected to use the same key).
  • Reviewed and ensured thread safety once again.

Copy link

codecov bot commented May 26, 2024

Codecov Report

Attention: Patch coverage is 71.69811% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 27.19%. Comparing base (abbddfe) to head (e3c252e).

Files Patch % Lines
internal/cache/action.go 65.21% 5 Missing and 3 partials ⚠️
internal/dao/query_find.go 79.31% 6 Missing ⚠️
internal/dao/query_find_create.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #884      +/-   ##
==========================================
- Coverage   27.30%   27.19%   -0.11%     
==========================================
  Files         198      198              
  Lines        8170     8166       -4     
==========================================
- Hits         2231     2221      -10     
- Misses       5806     5811       +5     
- Partials      133      134       +1     
Flag Coverage Δ
go 27.19% <71.69%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@qwqcode qwqcode merged commit d2161cc into master May 26, 2024
7 checks passed
@qwqcode qwqcode deleted the refactor/dao branch May 26, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant