mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 11:59:00 +08:00
fix: accesslog writer cache close cause deadlock (#33261)
relate: https://github.com/milvus-io/milvus/issues/33260 Signed-off-by: aoiasd <zhicheng.yue@zilliz.com>
This commit is contained in:
parent
de7901121f
commit
13fdaea9f0
@ -113,12 +113,15 @@ func (l *CacheWriter) Start() {
|
||||
}
|
||||
|
||||
func (l *CacheWriter) Close() {
|
||||
l.mu.Lock()
|
||||
defer l.mu.Unlock()
|
||||
l.closeOnce.Do(func() {
|
||||
l.closed = true
|
||||
// close auto flush
|
||||
close(l.closeCh)
|
||||
l.closeWg.Wait()
|
||||
|
||||
l.mu.Lock()
|
||||
defer l.mu.Unlock()
|
||||
l.closed = true
|
||||
|
||||
// flush remaining bytes
|
||||
l.writer.Flush()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user