aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2023-09-28 07:58:43 -0700
committerchrislu <chris.lu@gmail.com>2023-09-28 07:58:43 -0700
commit40888b561226004765ce158e922df6aca5dcfe70 (patch)
treee03ed94299f2879d5b37f35cbdddb1bed23415e7
parentabe599ee4af727ddbf98320586bb20fd675eb1f9 (diff)
downloadseaweedfs-40888b561226004765ce158e922df6aca5dcfe70.tar.xz
seaweedfs-40888b561226004765ce158e922df6aca5dcfe70.zip
align 64bit atomic operation
fix https://github.com/seaweedfs/seaweedfs/issues/4878
-rw-r--r--weed/util/lock_table.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/util/lock_table.go b/weed/util/lock_table.go
index 2e689d330..bf3da7c37 100644
--- a/weed/util/lock_table.go
+++ b/weed/util/lock_table.go
@@ -10,9 +10,9 @@ import (
// LockTable is a table of locks that can be acquired.
// Locks are acquired in order of request.
type LockTable[T comparable] struct {
+ lockIdSeq int64
mu sync.Mutex
locks map[T]*LockEntry
- lockIdSeq int64
}
type LockEntry struct {