Commit Graph

421 Commits (a81234a25bb7b619f7e386f52bd08198a02de8f0)

Author SHA1 Message Date
Anthony Romano a81234a25b concurrency: extend STM interface to Get from any of a list of keys
Now possible to fetch multiple keys in a single txn.
2017-01-20 16:22:42 -08:00
Anthony Romano 59880a0ab8 concurrency: variadic stm options
Makes txn isolation and the context variadic options.
2017-01-20 16:22:42 -08:00
Derek Chiang acec15ebc6 clientv3/concurrency: fix rev comparison on concurrent key deletion 2017-01-19 20:51:31 -08:00
Xiang Li 5cf0d6678b Merge pull request #7174 from vimalk78/support-v3-txn-without-condition
clientv3/txn.go : removed the TODO: add a Do for shortcut the txn without any condition
2017-01-19 08:45:34 -08:00
Vimal Kumar fcaa509e4c clientv3/txn.go : removed the TODO: add a Do for shortcut the txn without any condition 2017-01-18 11:37:29 +05:30
fanmin shi 3a40421aa5 Merge pull request #7157 from fanminshi/clientv3_balancer_uses_one_connection
clientv3: balancer uses one connection at a time
2017-01-17 12:12:35 -08:00
fanmin shi df55438a60 clientv3: balancer uses one connection at a time
FIX #7080
2017-01-17 10:09:41 -08:00
Steve Phillips eb7a804ca8 kv.go: Fixed []byte to string conversion syntax in comment 2017-01-15 05:57:16 -08:00
Gyu-Ho Lee d94d22122b clientv3: add 'WithIgnoreValue' option 2017-01-13 15:13:18 -08:00
Anthony Romano 7dfe503f1c Merge pull request #7148 from heyitsanthony/fix-lease-overlap
clientv3: don't reset stream on keepaliveonce or revoke failure
2017-01-13 10:05:02 -08:00
Anthony Romano 5e3b20e70c clientv3: don't reset stream on keepaliveonce or revoke failure
Would cause the keepalive loop to cancel out.

Fixes #7082
2017-01-13 09:05:23 -08:00
Hitoshi Mitake c89eae790d Merge pull request #7110 from mitake/reauth
etcdserver, clientv3: handle a case of expired auth token
2017-01-13 11:57:25 +09:00
fanmin shi 6d443ba3f9 clienv3: fix balancer test logic 2017-01-12 13:07:44 -08:00
Hitoshi Mitake d431b64d97 etcdserver, clientv3: handle a case of expired auth token
This commit adds a mechanism of handling a case of expired auth token
to clientv3. If a server returns an error code
grpc.codes.Unauthenticated, newRetryWrapper() tries to get a new token
and use it as an option of PerRPCCredential.

Fixes https://github.com/coreos/etcd/issues/7012
2017-01-12 11:49:02 +09:00
Anthony Romano a375e91c66 clientv3: don't reset keepalive stream on grant failure
Was triggering cancelation errors on outstanding KeepAlives if Grant
had to retry.
2016-12-16 10:36:51 -08:00
Anthony Romano 46bd842db9 clientv3/integration: test lease grant/keepalive with/without failures 2016-12-16 10:36:51 -08:00
Xiang Li 86a43849fb Merge pull request #7010 from dennwc/keepalive-exit-err
clientv3: ensure KeepAlive channel is closed or error is returned
2016-12-15 08:06:36 -08:00
Denys Smirnov b126e31132 clientv3: better error message for keep alive loop halt 2016-12-15 16:06:27 +02:00
Denys Smirnov 5183ce0118 clientv3: add test for keep alive loop exit case 2016-12-15 03:02:44 +02:00
Denys Smirnov e0bcd4d516 clientv3: return error from KeepAlive if corresponding loop exits
after recvKeepAliveLoop exits client might call KeepAlive adding request channel that will not be closed
this fix makes sure that recvKeepAliveLoop is running before adding request to lessor's list and returns error otherwise

Fixes #6922
2016-12-15 03:02:35 +02:00
Anthony Romano 246fb29d8a clientv3: close Lease on client Close
Fixes #6987
2016-12-14 12:11:17 -08:00
Anthony Romano fdd89df1eb clientv3/integration: test lease keepalive works following quorum loss 2016-12-06 14:09:57 -08:00
Gyu-Ho Lee a08103c088 clientv3: return copy of endpoints, not pointer
Fix https://github.com/coreos/etcd/issues/6892.
2016-11-23 11:33:54 -08:00
fanmin shi ab6b175a2a Merge pull request #6828 from fanminshi/add_not_equal_to_compare
etcdserver, clientv3: add "!=" to txn
2016-11-09 15:27:08 -08:00
fanmin shi 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
Kelvin Liang c20d31adc5 clientv3/naming: support OpOption when adding an endpoint
if we want to add an endpoint with lease, we need this option.
for example:

    resp, err := cli.Grant(context.TODO(), 5)
    if err != nil {
        log.Fatal(err)
    }

    err = r.Update(context.TODO(), serviceName, naming.Update{Op:naming.Add, Addr: exposedAddr}, clientv3.WithLease(resp.ID))
    if err != nil {
        log.Fatalf(err)
    }
2016-11-09 15:30:17 -04:00
Gyu-Ho Lee dbb692e50f Merge pull request #6820 from gyuho/watcher
mvcc: return -1 for wrong watcher range key >= end
2016-11-08 17:36:19 -08:00
Gyu-Ho Lee 9dd75a946f clientv3, ctlv3: document range end requirement 2016-11-08 17:02:32 -08:00
Gyu-Ho Lee a93d8dfe62 Merge pull request #6821 from gyuho/manual
*: fix minor typos, styles
2016-11-08 15:39:26 -08:00
Gyu-Ho Lee 2955d58776
clientv3/integration: fix minor typos, consistent formatting 2016-11-08 12:37:33 -08:00
Anthony Romano 1aeeb38459 clientv3: let watchers cancel when reconnecting 2016-11-08 12:02:17 -08:00
Anthony Romano 7b5e5eadb1 integration: test canceling a watcher on disconnected stream 2016-11-08 12:02:17 -08:00
Anthony Romano fe755b6250 Merge pull request #6748 from sinsharat/client_metric_add_tests
clientv3: added test for client metrics
2016-11-02 15:00:08 -07:00
sharat 195570b621 clientv3: updated doc for metric support 2016-11-03 03:22:59 +05:30
sinsharat 13acad85b3 clientv3: added test for client metrics 2016-11-03 00:38:29 +05:30
Gyu-Ho Lee 0684d8c4c6 clientv3/integration: close active connection to get ErrClientConnClosing
because clientv3.Close won't trigger it any more

clientv3.Close just closes watch client
instead of closing grpc connection
2016-11-01 11:13:33 -07:00
Gyu-Ho Lee 5bd00ab1f6 *: fix minor typos 2016-10-31 09:47:15 -07:00
Anthony Romano 0345226759 Merge pull request #6751 from heyitsanthony/fix-require-leader-test
integration: put key on watch target member for TestWatchWithRequireLeader
2016-10-28 23:24:00 -04:00
Anthony Romano d8ea9d22b6 integration: put key on watch target member for TestWatchWithRequireLeader
It's possible the put will not propagate to all members before removing quorum,
causing watches on the key to wait forever.

Fixes #6386
2016-10-28 13:12:26 -04:00
sharat a1bfb31219 clientv3: added example for client metrics 2016-10-28 04:30:17 +05:30
Xiang Li 89107a49fa Merge pull request #6741 from sinsharat/clientv3_add_client_side_metrics
clientv3: added client side metrics support
2016-10-27 13:22:10 -07:00
Gyu-Ho Lee 0a3d45a307 clientv3: send create event over outc 2016-10-27 11:11:16 -07:00
sharat 8fd1dd7862 clientv3: added client side metrics support 2016-10-27 22:47:45 +05:30
Gyu-Ho Lee 8e5f34fd97 Merge pull request #6709 from yudai/error_url
clientv3: Fix URL to rpc errors
2016-10-24 18:52:46 -07:00
Iwasaki Yudai e7e29ba249 clientv3: Fix URL to rpc errors 2016-10-24 16:38:05 -07:00
Xiang Li 77be124391 Merge pull request #6691 from xiang90/fix_retry
clientv3: do not retry on mutable operations
2016-10-24 10:32:34 -07:00
Anthony Romano ae99c91903 Merge pull request #6698 from heyitsanthony/session-close
concurrency: terminate session.Close if revoke takes longer than TTL
2016-10-24 09:14:09 -07:00
Xiang Li 81f151eed2 clientv3: fix retry logic
1. Balancer should setup gRPC error code correctly for retry.

2. We should not mask context error.
2016-10-22 22:15:43 -07:00
Anthony Romano f38a5d19a8 concurrency: add WithContext option to sessions
Makes it possible to cancel session requests without having to
close the entire client.
2016-10-21 16:26:59 -07:00
Anthony Romano 1e330a90c7 concurrency: terminate session.Close if revoke takes longer than TTL
Fixes #6681
2016-10-21 16:21:01 -07:00