Closed workhorse2020 closed 3 years ago
Should include self when setting the pool.
pool.Set("http://y.y.y.y:8280", "http://x.x.x.x:8380")
@thrawn01 I guess the main example from readme has to be update, because there, self is not being added to the pool:
// Keep track of peers in our cluster and add our instance to the pool `http://localhost:8080`
pool := groupcache.NewHTTPPoolOpts("http://localhost:8080", &groupcache.HTTPPoolOptions{})
// Add more peers to the cluster
pool.Set("http://peer1:8080", "http://peer2:8080")
@Trane9991 done!
When give the sameway to the other people y.y.y.y poolset as x.x.x.x it goes into a deadlock and looking up the db if entry not found. If in y.y.y.y I don;t give Set as x.x.x.x things works fine.
Hence precisely
A-> B B-> A
Above is not valid and we should make sure it doesn't happen this way ?. I mean circular loop ?.
rgds Kamal