can not get lock after release.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go
- Domain
- distributed-systems
Research direction
Start by running the provided Go reproduction with the etcd-backed store and follow the NewLock, Lock, and Unlock entry points for both lockers. Done means locker2 acquires the /test lock after locker1.Unlock, then can unlock it successfully; add or run a regression test if the repository provides a relevant lock-test location.
Written by the indexing model from the issue text.
Description
I write a simple program to test locker. I found locker2 can not get lock after locker1 Unlock.
func main() {
stopChan1 := make(chan struct{})
stopChan2 := make(chan struct{})
etcd.Register()
s, _ := libkv.NewStore(store.ETCD, []string{"127.0.0.1:2379"}, nil)
locker1, _ := s.NewLock("/test", &store.LockOptions{Value: []byte("testvalue"), TTL: 2 * time.Second})
locker2, _ := s.NewLock("/test", &store.LockOptions{Value: []byte("testvalue2"), TTL: 3 * time.Second})
fmt.Println("start lock locker1")
locker1.Lock(stopChan1)
fmt.Println("get locker1")
go func() {
fmt.Println("start lock locker2")
locker2.Lock(stopChan2)
fmt.Println("get locker2")
locker2.Unlock()
fmt.Println("unlock locker2")
}()
time.Sleep(3 * time.Second)
fmt.Println("start unlock locker1")
locker1.Unlock()
fmt.Println("unlock locker1")
time.Sleep(5 * time.Second)
}
get locker1
start lock locker2
start unlock locker1
unlock locker1
- Dominant language
- Go
- Stars
- 847
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker/libkv
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100