From 93a597fce485ab9537a481a38aeca9f7b1745023 Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Fri, 17 Apr 2020 14:40:13 +0300 Subject: [PATCH] - querylog: fix get data Close #1589 Squashed commit of the following: commit 83d1d15f06a67746feb0e82fb71d5ea02f86ab69 Author: Simon Zolin Date: Fri Apr 17 14:11:00 2020 +0300 - querylog: fix get data --- querylog/qlog.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/querylog/qlog.go b/querylog/qlog.go index f8792d8f..247bb519 100644 --- a/querylog/qlog.go +++ b/querylog/qlog.go @@ -238,7 +238,7 @@ func (l *queryLog) getData(params getDataParams) map[string]interface{} { entries := append(memoryEntries, fileEntries...) if len(entries) > getDataLimit { // remove extra records - entries = entries[(len(entries) - getDataLimit):] + entries = entries[:getDataLimit] } if len(entries) == getDataLimit { // change the "oldest" value here.