mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
enhance: make delegator lock critical smaller (#36997)
issue: #36804 Signed-off-by: chyezh <chyezh@outlook.com>
This commit is contained in:
parent
70339820fa
commit
ac178eeea5
@ -878,6 +878,9 @@ func (sd *shardDelegator) ReleaseSegments(ctx context.Context, req *querypb.Rele
|
||||
case querypb.DataScope_Historical:
|
||||
sealed = lo.Map(req.GetSegmentIDs(), convertSealed)
|
||||
}
|
||||
signal := sd.distribution.RemoveDistributions(sealed, growing)
|
||||
// wait cleared signal
|
||||
<-signal
|
||||
|
||||
if len(growing) > 0 {
|
||||
sd.growingSegmentLock.Lock()
|
||||
@ -893,9 +896,6 @@ func (sd *shardDelegator) ReleaseSegments(ctx context.Context, req *querypb.Rele
|
||||
})
|
||||
sd.AddExcludedSegments(droppedInfos)
|
||||
|
||||
signal := sd.distribution.RemoveDistributions(sealed, growing)
|
||||
// wait cleared signal
|
||||
<-signal
|
||||
if len(sealed) > 0 {
|
||||
sd.pkOracle.Remove(
|
||||
pkoracle.WithSegmentIDs(lo.Map(sealed, func(entry SegmentEntry, _ int) int64 { return entry.SegmentID })...),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user