Commit Graph

25 Commits

Author SHA1 Message Date
e7f4010cca lease: Use monotonic time in lease
lease uses monotimer to calculate its expiration. In this way, changing system time won't affect in lease expiration.

FIX #6700
2016-11-29 12:31:00 -08:00
5adca4a720 lease, leasehttp: add TTL() method
Fix https://github.com/coreos/etcd/issues/6595.
2016-10-06 11:24:09 -07:00
f0469f7f25 Merge pull request #6570 from xiang90/lease_expire
Fix lease expire
2016-10-05 15:49:45 -07:00
279c103517 lease: fix lease expire and add a test 2016-10-05 14:41:47 -07:00
4871a4a5f3 lease: remove redundant get method 2016-09-30 10:27:27 -07:00
4d59b6f52c lease: delete kvs in a txn 2016-08-04 10:06:46 -07:00
bf71497537 etcdserver, lease: tie lease min ttl to election timeout 2016-08-02 13:06:57 -07:00
ea21b8ee1f lessor: fix go vet, goword warnings, and unreliable test 2016-06-17 13:37:25 -07:00
ef44f71da9 *: update LICENSE header 2016-05-12 20:51:48 -07:00
b7ac758969 *: rename storage package to mvcc 2016-04-25 15:25:51 -07:00
e9a0a103e5 *: refresh the lease TTL correctly when a leader is elected.
The new leader needs to refresh with an extened TTL to gracefully handle
the potential concurrent leader issue. Clients might still send keep alive
to old leader until the old leader itself gives up leadership at most after
an election timeout.
2016-03-15 22:40:03 -07:00
bfa5e310a9 *: detach keys from leases
1. deatch when a key is removed
2. deatch when the key's lease changes
3. potentially deatch when restroing a tombstone key
2016-02-11 15:31:25 -08:00
20461ab11a *: fix many typos 2016-01-31 21:42:39 -08:00
9113a27bde lease: grant consistent lease IDs
When raft broadcasts a Grant to all nodes, all nodes must
agree on the same lease ID. Otherwise, attaching a key to
a lease will fail since the lease ID is node-dependent.
2016-01-22 09:43:39 -08:00
59bf83c7f4 *: now lease keepAlive works on leader 2016-01-09 22:12:02 -08:00
f01c8188f8 *: rename lease.DeleteableRange to lease.RangeDeleter 2016-01-09 11:01:58 -08:00
f5753f2f51 *: support lease Attach
Now we can attach keys to leases. And revoking the lease removes all
the attached keys of that lease.
2016-01-09 11:01:58 -08:00
12912501bd lease: remove minExpiry and add helper funcs 2016-01-08 14:29:33 -08:00
2566699a48 *: revoke expired leases 2016-01-08 13:37:58 -08:00
d9ca929a33 *: add support for lease create and revoke
Basic support for lease operations like create and revoke.
We still need to:
1. attach keys to leases in KV implmentation if lease field is set
2. leader periodically removes expired leases
3. leader serves keepAlive requests and follower forwards keepAlive
requests to leader.
2016-01-07 16:39:39 -08:00
9156e54f1f lease: recovery leases from backend 2016-01-05 11:21:11 -08:00
09b420f08c *: move leaseID typedef to lease pkg 2016-01-05 10:18:17 -08:00
25f82b25f7 lease: modify API and persist lease to disk 2016-01-05 10:09:42 -08:00
bf3bc0ed6b lease: delete items when the lease is revoked.
Add minimum KV interface and implmement the deleting mechanism for
revoking lease.
2015-11-11 13:21:12 -08:00
bf70b5127a lease: initial lessor impl 2015-11-08 11:28:50 -08:00