From 81ef8218fb79d6f27f7db096e051a4b65572eb52 Mon Sep 17 00:00:00 2001 From: Josh Baker Date: Thu, 10 Aug 2017 13:31:36 -0700 Subject: [PATCH] lifted limit cap --- controller/scanner.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/controller/scanner.go b/controller/scanner.go index 6315383f..d6e01f46 100644 --- a/controller/scanner.go +++ b/controller/scanner.go @@ -3,6 +3,7 @@ package controller import ( "bytes" "errors" + "math" "strconv" "sync" @@ -14,7 +15,6 @@ import ( ) const limitItems = 100 -const capLimit = 100000 type outputT int @@ -70,16 +70,18 @@ func (c *Controller) newScanWriter( ) ( *scanWriter, error, ) { - if limit == 0 { - limit = limitItems - } else if limit > capLimit { - limit = capLimit - } switch output { default: return nil, errors.New("invalid output type") case outputIDs, outputObjects, outputCount, outputBounds, outputPoints, outputHashes: } + if limit == 0 { + if output == outputCount { + limit = math.MaxUint64 + } else { + limit = limitItems + } + } sw := &scanWriter{ c: c, wr: wr,