use object modTime for the event sequencer ID (#18285)

always set modTime after lock is acquired in
completemultipart stage to make sure that the
modTime is not racy.
This commit is contained in:
Harshavardhana
2023-10-20 19:28:05 -07:00
committed by GitHub
parent aa703dc903
commit bbfea29c2b
4 changed files with 19 additions and 17 deletions

View File

@@ -210,6 +210,9 @@ type eventArgs struct {
func (args eventArgs) ToEvent(escape bool) event.Event {
eventTime := UTCNow()
uniqueID := fmt.Sprintf("%X", eventTime.UnixNano())
if !args.Object.ModTime.IsZero() {
uniqueID = fmt.Sprintf("%X", args.Object.ModTime.UnixNano())
}
respElements := map[string]string{
"x-amz-request-id": args.RespElements["requestId"],