From 8b0d1aa4afe8f9e6d84da918ba3074497b95b84c Mon Sep 17 00:00:00 2001 From: Johan Brandhorst-Satzkorn Date: Fri, 24 Nov 2023 17:17:22 -0800 Subject: [PATCH] globals: Add new DatabaseReadTimeout The new field is used as a buffer in certain list queries, to account for concurrent transactions. --- globals/globals.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/globals/globals.go b/globals/globals.go index cdd8d08f2a..d213a3d015 100644 --- a/globals/globals.go +++ b/globals/globals.go @@ -30,6 +30,10 @@ var ( // DefaultMaxPageSize is the maximum list page size allowed if not set in the config. DefaultMaxPageSize = 1000 + // RefreshReadLookbackDuration is used to account for database state mutations + // missed due to concurrent transactions. + RefreshReadLookbackDuration = 30 * time.Second + // ContextMaxRequestSizeTypeKey is a value to keep linters from complaining // about clashing string identifiers ContextMaxRequestSizeTypeKey ContextMaxRequestSizeType