feat(async-search): fetch fractions one by one to avoid global lock#424
feat(async-search): fetch fractions one by one to avoid global lock#424eguguchkin wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #424 +/- ##
==========================================
- Coverage 70.65% 70.58% -0.08%
==========================================
Files 219 219
Lines 16967 16983 +16
==========================================
- Hits 11988 11987 -1
- Misses 4084 4098 +14
- Partials 895 898 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
5d12ddb to
bda808a
Compare
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
| defer func() { <-smm.rateLimit }() | ||
|
|
||
| f, release, ok := fracs.AcquireFraction(fracNameFromFilePath(name)) | ||
| defer release() |
There was a problem hiding this comment.
For now, release() is noop, but it will change after merge of #277.
Are you sure that is good idea to release fraction even if it was not found?
There was a problem hiding this comment.
maybe defer release after if !ok check?
|
|
||
| func (as *AsyncSearcher) acquireAndProcessFrac(fracInfo fracSearchState, searchInfo asyncSearchInfo, fracs fractionAcquirer) (err error) { | ||
| f, release, ok := fracs.AcquireFraction(fracInfo.Name) | ||
| defer release() |
There was a problem hiding this comment.
And the same question here.
https://github.com/ozontech/seq-db/pull/424/changes#r3247151983
| defer r.muAll.RUnlock() | ||
|
|
||
| f, ok := r.allMap[name] | ||
| return f, func() {}, ok |
There was a problem hiding this comment.
why it always returns empty function? is it gonna be used later?
| defer func() { <-smm.rateLimit }() | ||
|
|
||
| f, release, ok := fracs.AcquireFraction(fracNameFromFilePath(name)) | ||
| defer release() |
There was a problem hiding this comment.
maybe defer release after if !ok check?
Fixes #423