Skip to content

Commit

Permalink
Use transaction in db_client pubsub notification, to avoid inconsistency
Browse files Browse the repository at this point in the history
introduced by other concurrent cmd.
  • Loading branch information
FengPan-Frank committed May 26, 2023
1 parent 59b332f commit fc40d5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sonic_data_client/db_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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", tblPath, dbkey)
continue
}

if tblPath.jsonTableKey != "" { // If jsonTableKey was prepared, use it
Expand Down

0 comments on commit fc40d5d

Please sign in to comment.