From 757db59231e1f52ea24c21b03933430301b1b62a Mon Sep 17 00:00:00 2001 From: Angelo De Caro Date: Thu, 28 Nov 2024 15:19:25 +0100 Subject: [PATCH] move warn to debug Signed-off-by: Angelo De Caro --- platform/view/services/db/driver/badger/badger.go | 2 +- platform/view/services/db/driver/sql/common/base.go | 2 +- platform/view/services/db/driver/sql/postgres/base.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/view/services/db/driver/badger/badger.go b/platform/view/services/db/driver/badger/badger.go index 8de574841..f20228715 100644 --- a/platform/view/services/db/driver/badger/badger.go +++ b/platform/view/services/db/driver/badger/badger.go @@ -102,7 +102,7 @@ func (db *DB) Close() error { func (db *DB) SetState(namespace driver2.Namespace, key string, value driver.VersionedValue) error { if len(value.Raw) == 0 { - logger.Warnf("set key [%s:%v] to nil value, will be deleted instead", key, value.Version) + logger.Debugf("set key [%s:%v] to nil value, will be deleted instead", key, value.Version) return db.DeleteState(namespace, key) } return db.setValues(namespace, key, value.Raw, nil, value.Version) diff --git a/platform/view/services/db/driver/sql/common/base.go b/platform/view/services/db/driver/sql/common/base.go index e59005db5..901090a59 100644 --- a/platform/view/services/db/driver/sql/common/base.go +++ b/platform/view/services/db/driver/sql/common/base.go @@ -198,7 +198,7 @@ func (db *BasePersistence[V, R]) SetStateWithTx(tx *sql.Tx, ns driver2.Namespace valIndex := slices.Index(keys, "val") val := values[valIndex].([]byte) if len(val) == 0 { - logger.Warnf("set key [%s:%s] to nil value, will be deleted instead", ns, pkey) + logger.Debugf("set key [%s:%s] to nil value, will be deleted instead", ns, pkey) return db.DeleteState(ns, pkey) } diff --git a/platform/view/services/db/driver/sql/postgres/base.go b/platform/view/services/db/driver/sql/postgres/base.go index 9a2705e46..1ad1fa9f2 100644 --- a/platform/view/services/db/driver/sql/postgres/base.go +++ b/platform/view/services/db/driver/sql/postgres/base.go @@ -54,7 +54,7 @@ func (db *BasePersistence[V, R]) setStatesWithTx(tx *sql.Tx, ns driver.Namespace values := db.ValueScanner.WriteValue(value) // Get rawVal if val := values[valIndex].([]byte); len(val) == 0 { - logger.Warnf("set key [%s:%s] to nil value, will be deleted instead", ns, pkey) + logger.Debugf("set key [%s:%s] to nil value, will be deleted instead", ns, pkey) deleted = append(deleted, pkey) } else { logger.Debugf("set state [%s,%s]", ns, pkey)