- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 50 for lockers (0.09 sec)
-
internal/dsync/locker.go
package dsync import "context" // NetLocker is dsync compatible locker interface. type NetLocker interface { // Do read lock for given LockArgs. It should return // * a boolean to indicate success/failure of the operation // * an error on failure of lock request operation. RLock(ctx context.Context, args LockArgs) (bool, error) // Do write lock for given LockArgs. It should return
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 18 20:44:38 UTC 2022 - 2.7K bytes - Viewed (0) -
cmd/namespace-lock.go
} nsLk.ref++ n.lockMap[resource] = nsLk n.lockMapMutex.Unlock() // Locking here will block (until timeout). if readLock { locked = nsLk.GetRLock(ctx, opsID, lockSource, timeout) } else { locked = nsLk.GetLock(ctx, opsID, lockSource, timeout) } if !locked { // We failed to get the lock // Decrement ref count since we failed to get the lock n.lockMapMutex.Lock() n.lockMap[resource].ref--
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 9.2K bytes - Viewed (0) -
cmd/namespace-lock_test.go
// Unlock the 1st lock; ref=1 after this line nsLk.unlock("volume", "path", false) // Taking another lockMapMutex here allows queuing up additional lockers. This should // not be required but makes reproduction much easier. nsLk.lockMapMutex.Lock() // lk3 blocks. lk3ch := make(chan bool) go func() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 3.1K bytes - Viewed (0) -
cmd/lock-rest-client.go
func (c *lockRESTClient) String() string { return c.connection.Remote } func (c *lockRESTClient) call(ctx context.Context, h *grid.SingleHandler[*dsync.LockArgs, *dsync.LockResp], args *dsync.LockArgs) (ok bool, err error) { r, err := h.Call(ctx, c.connection, args) if err != nil { return false, err } defer h.PutResponse(r) ok = r.Code == dsync.RespOK switch r.Code {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 3.3K bytes - Viewed (0) -
cmd/lock-rest-server-common_test.go
TimeLastRefresh: UTCNow().UnixNano(), } locker.ll.lockMap["name"] = []lockRequesterInfo{ lockRequesterInfo1, lockRequesterInfo2, } lri := locker.ll.lockMap["name"] // test unknown uid if locker.ll.removeEntry("name", dsync.LockArgs{ Owner: "owner", UID: "unknown-uid", }, &lri) { t.Errorf("Expected %#v, got %#v", false, true) } if !locker.ll.removeEntry("name", dsync.LockArgs{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 3.2K bytes - Viewed (0) -
cmd/lock-rest-server.go
) func newLockHandler(h grid.HandlerID) *grid.SingleHandler[*dsync.LockArgs, *dsync.LockResp] { return grid.NewSingleHandler[*dsync.LockArgs, *dsync.LockResp](h, func() *dsync.LockArgs { return &dsync.LockArgs{} }, func() *dsync.LockResp { return &dsync.LockResp{} }) } // registerLockRESTHandlers - register lock rest router.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 5.8K bytes - Viewed (0) -
internal/dsync/lock-args_gen_test.go
t.Errorf("%d bytes left over after Skip(): %q", len(left), left) } } func BenchmarkMarshalMsgLockArgs(b *testing.B) { v := LockArgs{} b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { v.MarshalMsg(nil) } } func BenchmarkAppendMsgLockArgs(b *testing.B) { v := LockArgs{} bts := make([]byte, 0, v.Msgsize()) bts, _ = v.MarshalMsg(bts[0:0]) b.SetBytes(int64(len(bts))) b.ReportAllocs()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Nov 21 01:09:35 UTC 2023 - 4.4K bytes - Viewed (0) -
internal/dsync/lock-args.go
//go:generate msgp -file $GOFILE // LockArgs is minimal required values for any dsync compatible lock operation. type LockArgs struct { // Unique ID of lock/unlock request. UID string // Resources contains single or multiple entries to be locked/unlocked. Resources []string // Owner represents unique ID for this instance, an owner who originally requested // the locked resource, useful primarily in figuring out stale locks.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 1.8K bytes - Viewed (0) -
internal/lsync/lrwmutex_test.go
} } func TestSimpleWriteLockTimedOut(t *testing.T) { locked := testSimpleWriteLock(t, time.Second) expected := false if locked != expected { t.Errorf("TestSimpleWriteLockTimedOut(): \nexpected %#v\ngot %#v", expected, locked) } } func testDualWriteLock(t *testing.T, duration time.Duration) (locked bool) { ctx := context.Background()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Mar 05 04:57:35 UTC 2023 - 7.9K bytes - Viewed (0) -
cmd/callhome.go
// Make sure only 1 callhome is running on the cluster. locker := objAPI.NewNSLock(minioMetaBucket, "callhome/runCallhome.lock") lkctx, err := locker.GetLock(ctx, callhomeLeaderLockTimeout) if err != nil { // lock timedout means some other node is the leader, // cycle back return 'true' return true } ctx = lkctx.Context() defer locker.Unlock(lkctx)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 17 16:53:34 UTC 2024 - 5.3K bytes - Viewed (0)