Browse Source

querylog/avro: avoid race condition when file is being closed for size and time

Ask Bjørn Hansen 2 years ago
parent
commit
3d0eaedbe4
1 changed files with 1 additions and 0 deletions
  1. 1 0
      querylog/avro.go

+ 1 - 0
querylog/avro.go

@@ -139,6 +139,7 @@ func (l *AvroLogger) writer(ctx context.Context) {
 		}
 
 		if !af.open {
+			mu.Unlock()
 			log.Printf("called closeFile on file already being closed %s", af.fh.Name())
 			return nil
 		}