Pull request: querylog: fix logic
Merge in DNS/adguard-home from fix-querylog-logs to master
Squashed commit of the following:
commit db6edb86f1f024c85efd3bca3ceb6dfc6ce04edd
Merge: d1981696 a3968658
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Mon Dec 13 13:48:25 2021 +0300
Merge branch 'master' into fix-querylog-logs
commit d1981696782ca9adc5213f76cdbe2dc9f859f921
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date: Fri Dec 10 21:14:04 2021 +0300
querylog: fix logic
This commit is contained in:
@@ -54,7 +54,7 @@ func NewQLogFile(path string) (*QLogFile, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
// SeekTS performs binary search in the query log file looking for a record
|
||||
// seekTS performs binary search in the query log file looking for a record
|
||||
// with the specified timestamp. Once the record is found, it sets
|
||||
// "position" so that the next ReadNext call returned that record.
|
||||
//
|
||||
@@ -71,7 +71,7 @@ func NewQLogFile(path string) (*QLogFile, error) {
|
||||
// so that when we call "ReadNext" this line was returned.
|
||||
// * Depth of the search (how many times we compared timestamps).
|
||||
// * If we could not find it, it returns one of the errors described above.
|
||||
func (q *QLogFile) SeekTS(timestamp int64) (int64, int, error) {
|
||||
func (q *QLogFile) seekTS(timestamp int64) (int64, int, error) {
|
||||
q.lock.Lock()
|
||||
defer q.lock.Unlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user