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

View File

@@ -27,16 +27,16 @@ type LockArgs struct {
// Resources contains single or multiple entries to be locked/unlocked.
Resources []string
// Source contains the line number, function and file name of the code
// on the client node that requested the lock.
Source string
// Owner represents unique ID for this instance, an owner who originally requested
// the locked resource, useful primarily in figuring out stale locks.
Owner string
// Source contains the line number, function and file name of the code
// on the client node that requested the lock.
Source string `msgp:"omitempty"`
// Quorum represents the expected quorum for this lock type.
Quorum int
Quorum *int `msgp:"omitempty"`
}
// ResponseCode is the response code for a locking request.