From 02645149b5b1628d4254e1b223d6fdc217efd3b9 Mon Sep 17 00:00:00 2001 From: Ryan Lettieri Date: Fri, 23 Sep 2022 14:27:06 -0600 Subject: [PATCH] Changing greater than symbol to greater than or equals logic in cosmos statestore Signed-off-by: Ryan Lettieri --- state/azure/cosmosdb/cosmosdb_query.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/state/azure/cosmosdb/cosmosdb_query.go b/state/azure/cosmosdb/cosmosdb_query.go index 670a3cf1b..7d6ed61d7 100644 --- a/state/azure/cosmosdb/cosmosdb_query.go +++ b/state/azure/cosmosdb/cosmosdb_query.go @@ -174,12 +174,12 @@ func (q *Query) execute(client *azcosmos.ContainerClient) ([]state.QueryItem, st if err != nil { return nil, "", err } - if (len(items) + 1) > resultLimit { + if len(items) >= resultLimit { break } items = append(items, tempItem) } - if (len(items) + 1) > resultLimit { + if len(items) >= resultLimit { break } }