From cdfda65028a56cc6fd990aa4b771f7b80d54deaf Mon Sep 17 00:00:00 2001 From: Feng Pan Date: Wed, 10 May 2023 13:39:58 +0000 Subject: [PATCH] Use transaction in db_client pubsub notification, to avoid inconsistency introduced by other concurrent cmd. --- sonic_data_client/db_client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonic_data_client/db_client.go b/sonic_data_client/db_client.go index a3b4293f..7adefb60 100644 --- a/sonic_data_client/db_client.go +++ b/sonic_data_client/db_client.go @@ -710,8 +710,8 @@ func tableData2Msi(tblPath *tablePath, useKey bool, op *string, msi *map[string] for idx, dbkey := range dbkeys { fv, err = redisDb.HGetAll(dbkey).Result() if err != nil { - log.V(2).Infof("redis HGetAll failed for %v, dbkey %s", tblPath, dbkey) - return err + log.V(2).Infof("redis HGetAll failed for %v, dbkey %s, ignore it since atomic is not guaranteed", tblPath, dbkey) + continue } if tblPath.jsonTableKey != "" { // If jsonTableKey was prepared, use it