Skip to content

Commit

Permalink
move warn to debug
Browse files Browse the repository at this point in the history
Signed-off-by: Angelo De Caro <[email protected]>
  • Loading branch information
adecaro committed Nov 28, 2024
1 parent 381d734 commit 757db59
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion platform/view/services/db/driver/badger/badger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion platform/view/services/db/driver/sql/common/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion platform/view/services/db/driver/sql/postgres/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 757db59

Please sign in to comment.