From e338ada43ca8221b09fe8d2ae66c5d95f29611d6 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 28 Nov 2017 17:51:14 +0100 Subject: dashboard/app: fix purging of old crashes We sorted by Report (which is a random int ID) instead of ReportLen. Sort by ReportLen (order is opposite of what of queryCrashesForBug uses). --- dashboard/app/api.go | 2 +- dashboard/app/index.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/app/api.go b/dashboard/app/api.go index 232316545..a3a466ce6 100644 --- a/dashboard/app/api.go +++ b/dashboard/app/api.go @@ -468,7 +468,7 @@ func purgeOldCrashes(c context.Context, bug *Bug, bugKey *datastore.Key) { Ancestor(bugKey). Filter("ReproC=", 0). Filter("ReproSyz=", 0). - Order("Report"). + Order("ReportLen"). Order("Time"). Limit(maxCrashes+batchSize). GetAll(c, &crashes) diff --git a/dashboard/app/index.yaml b/dashboard/app/index.yaml index 083b735e3..552054a9b 100644 --- a/dashboard/app/index.yaml +++ b/dashboard/app/index.yaml @@ -32,7 +32,7 @@ indexes: properties: - name: ReproC - name: ReproSyz - - name: Report + - name: ReportLen - name: Time - kind: Crash -- cgit mrf-deployment