use unixNanoTime instead of time.Time in lockRequestorInfo (#20140)

Bonus: Skip Source, Quorum fields in lockArgs that are never
sent during Unlock() phase.
This commit is contained in:
Harshavardhana
2024-07-24 03:24:01 -07:00
committed by GitHub
parent 6fe2b3f901
commit 3b21bb5be8
11 changed files with 197 additions and 89 deletions
+3 -2
View File
@@ -848,9 +848,10 @@ func (a adminAPIHandlers) DataUsageInfoHandler(w http.ResponseWriter, r *http.Re
}
func lriToLockEntry(l lockRequesterInfo, now time.Time, resource, server string) *madmin.LockEntry {
t := time.Unix(0, l.Timestamp)
entry := &madmin.LockEntry{
Timestamp: l.Timestamp,
Elapsed: now.Sub(l.Timestamp),
Timestamp: t,
Elapsed: now.Sub(t),
Resource: resource,
ServerList: []string{server},
Source: l.Source,