b5cde6b321
lease: use atomics for accessing lease expiry
...
Demote was racing on expiry when LeaseTimeToLive called Remaining. Replace
with intrinsics since the ordering isn't important, but torn writes are
bad.
2016-12-28 15:44:14 -08:00
7b7feb46fc
leasehttp: buffer error channel to prevent goroutine leak
2016-12-22 14:25:01 -08:00
fef4a79528
lease: force leader to apply its pending committed index for lease operations
...
suppose a lease granting request from a follower goes through and followed by a lease look up or renewal, the leader might not apply the lease grant request locally. So the leader might not find the lease from the lease look up or renewal request which will result lease not found error. To fix this issue, we force the leader to apply its pending commited index before looking up lease.
FIX #6978
2016-12-22 14:24:38 -08:00
be1f36d97c
v3rpc, etcdserver, leasehttp: ctxize Renew with request timeout
...
Would retry a few times before returning a not primary error that
the client should never see. Instead, use proper timeouts and
then return a request timeout error on failure.
Fixes #6922
2016-12-06 14:09:57 -08:00
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
b8b72f80f9
*: revendor, update proto files
2016-11-10 12:02:00 -08:00
c2fd42b556
etcdserver, clientv3: add "!=" to txn
...
adding != to compare is a requested functionality from a etcd user
FIX #6719
2016-11-09 14:28:36 -08:00
c931f4d164
leasehttp: use graceful close, add tests, remove TODO
2016-11-02 16:33:26 -07:00
064e02f4b3
mvcc: Optimize updating key by storing lease in lessor
2016-10-12 09:37:09 +05: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
9b56e51ca7
*: regenerate proto + gofmt change
2016-10-03 15:34:34 -07:00
4f9be94643
lessor: delete keys in deterministic order on revoke
...
Fixes #6558
2016-09-30 16:45:52 -07:00
4871a4a5f3
lease: remove redundant get method
2016-09-30 10:27:27 -07:00
69f5b4ba79
Documentation:made watch request doc more clear
2016-09-23 23:13:55 +08:00
617d2d5b98
lease/*: add lease handler for 'LeaseTimeToLive'
2016-09-09 08:11:46 +09:00
d69d438289
*: minor cleanup for lease
2016-08-04 20:39:32 -07:00
75c06cacae
lease: do lease delection in the kv txn
2016-08-04 10:06:47 -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
982e18d80b
*: regenerate proto with latest grpc-gateway
2016-07-27 13:21:03 -07:00
fffa484a9f
*: regenerate proto for adding deleterange
2016-07-23 16:17:44 -07:00
50be793f09
*: regenerate proto
2016-07-18 09:33:32 -07:00
3839a55910
*: fix issue found in fast lease renew
2016-07-15 15:07:15 -07:00
ea21b8ee1f
lessor: fix go vet, goword warnings, and unreliable test
2016-06-17 13:37:25 -07:00
5a7b7f7595
main: add grpc-gateway support
...
Now etcd can serve HTTP json request at /v3alpha/
2016-06-14 17:09:06 -07:00
1610391449
*: following changes for proto update
2016-06-07 13:33:03 -07:00
fc7da09d67
*: add missing godoc package descriptions
...
Fixes #4074
2016-05-27 15:15:26 -07:00
ef44f71da9
*: update LICENSE header
2016-05-12 20:51:48 -07:00
015acabdbb
*: rerun genproto -g
2016-05-02 23:02:31 -07:00
b7ac758969
*: rename storage package to mvcc
2016-04-25 15:25:51 -07:00
4b31acf0e0
*: update generated Proto
2016-04-25 14:08:33 -07:00
7a2ef3eb00
*: regenerate proto buffers
2016-04-13 16:24:07 -07:00
1044fbce2c
etcdctlv3: update aunto generated files
2016-04-12 22:48:47 +08:00
dc17eaace7
*: rename Lease Create to Grant
...
Creating a lease through the client API interface union looked like
"c.Create(...)"-- the method name wasn't very descriptive.
2016-04-07 12:28:14 -07:00
bd832e5b0a
*: migrate Godeps to vendor/
2016-03-22 17:10:28 -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
adcba975cb
*: recover lessor when applying snapshot
2016-03-10 17:06:58 -08: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
6f72b31316
integration: add test promote and move lease tests to lease_test.go
2016-02-02 13:45:11 -08:00
20461ab11a
*: fix many typos
2016-01-31 21:42:39 -08:00
a35d5889f6
*: update gRPC, proto interface
2016-01-26 17:41:39 -08:00
b1a45fe1c8
Merge pull request #4274 from xiang90/leasehttp
...
leasehttp: move lease/http.go to its own pkg
2016-01-25 10:25:25 +08:00
e925a359a2
lease: fix restore
2016-01-25 10:06:14 +08:00
1aa312fcce
*: lease forwarding should resue transport
2016-01-25 06:56:07 +08:00
5e2dbadbc0
leasehttp: move lease/http.go to its own pkg
2016-01-25 06:09:54 +08:00
9572197aee
etcdserver: return error when putting a key with a bad lease id
2016-01-22 20:47:31 -08:00
2e157530a0
etcdhttp, lease, v3api: forward keepalives to leader
...
keepalives don't go through raft so let follower peers announce
keepalives to the leader through the peer http handler
2016-01-22 12:40:40 -08:00
be7d573366
lease: store server-decided TTL in lease
...
If actual TTL is not stored in lease, the client will receive the correct
TTL and therefore won't be able to keepalive correctly.
2016-01-22 11:44:12 -08:00