Pull request 1796: 5661-opt-more-lock
Updates #5661. Squashed commit of the following: commit 0a1425df0ea1278c73ac88cbee053897d3daaf1b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Mar 31 18:31:19 2023 +0300 querylog: opt locks more
This commit is contained in:
@@ -167,8 +167,8 @@ func (l *queryLog) periodicRotate() {
|
||||
// checkAndRotate rotates log files if those are older than the specified
|
||||
// rotation interval.
|
||||
func (l *queryLog) checkAndRotate() {
|
||||
l.lock.Lock()
|
||||
defer l.lock.Unlock()
|
||||
l.confMu.RLock()
|
||||
defer l.confMu.RUnlock()
|
||||
|
||||
oldest, err := l.readFileFirstTimeValue()
|
||||
if err != nil && !errors.Is(err, os.ErrNotExist) {
|
||||
|
||||
Reference in New Issue
Block a user