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 Jun 27, 2023
1 parent fd78c42 commit c45e54a
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 @@ -747,8 +747,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
Expand Down

0 comments on commit c45e54a

Please sign in to comment.