Skip to content

Conversation

@veloting
Copy link

  1. put(key, value, opt.keepalive=true) to etcd
  2. kill etcd server
  3. wait for 30s
  4. start etcd server

problem:
5. the key will not exist in the etcd server

expect:
5. the (key, value) will put again in etcd server

@veloting
Copy link
Author

@ldez
When I was testing the keepalive option of the Put command, I found that once I restarted the etcd server, the keepalive behavior would be invalid. The most terrible thing is that I don't know when the keepalive will be invalid, so once I use the keepalive I have to start another coroutine to determine whether the Put information is still valid. Because of the lease.KeepAlive itself will return a channel, when the channel is closed, the keepalive fails. At this time, we can put it again to make the keepalive take effect. The following is the test flow

  1. call the put command (set keepalive=true)
  2. stop etcd server
  3. wait 30 seconds
  4. start etcd server

problem:
The set value does not exist on etcd

expect:
The set value still exists in etcd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant