You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go to the console and trigger the time.time verb. Do it once a second...
Expected result:
The first call to time.time should succeed
Subsequent calls to time.time should fail with could not obtain time lease for the next 10 seconds or so (waiting for the lease to expire)
Actual result:
First call succeeds
Subsequent calls fail indefinitely...
Trigger a new deploy of time by modifying any code in time.go
Taking down the old deployment will cause the lease to finally expire
Next call to time.time will succeed, and then the cycle continues...
From the digging I've done, here's why:
When we obtain a lease, the module connects to the controller and sends a message to the controller every so often in an attempt to heartbeat the lease
responds back to the module each time it receives a message in the stream
Once the module stops sending heartbeats, the controller doesn't stop the automatic renewal of the lease
Leaving that connection alive sounds like a resource leak. Is making sure that gets closed enough to make this safe, or should the controller also only heartbeat the lease when it receives the heartbeat message from the module?
The text was updated successfully, but these errors were encountered:
fixes#2215
When a module lease has an error (example ctx canceled due to the verb
call ending), it used to leave the stream with the controller open
forever. This change closes that stream.
Steps to reproduce:
examples/go/time/time.go
to obtain a lease but forget to release it:time.time
verb. Do it once a second...Expected result:
time.time
should succeedtime.time
should fail withcould not obtain time lease
for the next 10 seconds or so (waiting for the lease to expire)Actual result:
time
by modifying any code intime.go
time.time
will succeed, and then the cycle continues...From the digging I've done, here's why:
Leaving that connection alive sounds like a resource leak. Is making sure that gets closed enough to make this safe, or should the controller also only heartbeat the lease when it receives the heartbeat message from the module?
The text was updated successfully, but these errors were encountered: