Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions lib/events/dynamoevents/dynamoevents.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,17 @@ func (l *Log) putAuditEvent(ctx context.Context, sessionID string, in apievents.
// item event index/session id. Since we can't change the session
// id, update the event index with a new value and retry the put
// item.
l.
WithError(err).
WithFields(log.Fields{"event_type": in.GetType(), "session_id": sessionID, "event_index": in.GetIndex()}).
Error("Conflict on event session_id and event_index")
return trace.Wrap(l.handleConditionError(ctx, err, sessionID, in))
if err2 := l.handleConditionError(ctx, err, sessionID, in); err2 != nil {
// Only log about the original conflict if updating
// the session information fails.
l.
WithError(err).
WithFields(log.Fields{"event_type": in.GetType(), "session_id": sessionID, "event_index": in.GetIndex()}).
Error("Conflict on event session_id and event_index")
return trace.Wrap(err2)
}

return nil
}

return err
Expand Down