13180 Commits

Author SHA1 Message Date
Gyuho Lee
33e4877b56 pkg/adt: document textbook implementation with pseudo-code
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:02:15 -07:00
Gyuho Lee
c25f746f77 pkg/adt: mask test failure, add TODO
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:02:07 -07:00
Gyuho Lee
f4341fd35c pkg/adt: add "IntervalTree.Delete" failure case
Described in https://github.com/etcd-io/etcd/issues/10877.

"black-height" property: Every path from a node to any descendant leaf node must have the same number of black nodes.

Expected

    After deleting 11 (requires rebalancing):
                            [510,511]
                             /      \
                   ----------        --------------------------
                  /                                            \
              [383,384]                                       [830,831]
              /       \                                      /          \
             /         \                                    /            \
      [261,262](red)  [410,411]                     [647,648]           [899,900](red)
          /               \                              \                      /    \
         /                 \                              \                    /      \
      [82,83]           [292,293]                      [815,816](red)   [888,889]    [972,973]
            \                                                           /
             \                                                         /
          [238,239](red)                                       [953,954](red)

Got

    After deleting 11 (requires rebalancing):
                            [510,511]
                             /      \
                   ----------        --------------------------
                  /                                            \
              [82,83]                                       [830,831]
                    \                                      /          \
                     \                                    /            \
                  [383,384]                        [647,648]            [899,900]
                  /       \                              \                  /    \
                 /         \                              \                /      \
           [261,262]      [410,411]                      [815,816]   [888,889]    [972,973]
             /   \                                                                  /
            /     \                                                                /
     [238,239]   [292,293]                                                  [953,954]

This violates "black-height" property.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:01:58 -07:00
Gyuho Lee
b3152365bb pkg/adt: test node "11" deletion
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:01:51 -07:00
Gyuho Lee
d938435e44 pkg/adt: README "IntervalTree.Delete" test case images
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:01:43 -07:00
Gyuho Lee
594e7d6627 pkg/adt: README initial commit
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:01:35 -07:00
Gyuho Lee
266214d19e pkg/adt: add "visitLevel", make "IntervalTree" interface, more tests
Make "IntervalTree" an interface to abstract range tree interface

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:01:16 -07:00
Gyuho Lee
0b37ae05b1 pkg: clean up code format
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2019-08-09 11:00:44 -07:00
Gyuho Lee
3aef9a1a8f travis: update
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 10:57:38 -07:00
Gyuho Lee
4527f4c4b0 etcdserver: add "etcd_server_snapshot_apply_inflights_total"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 15:13:14 -07:00
Gyuho Lee
1c8fab7365 etcdserver/api: add "etcd_network_snapshot_send_inflights_total", "etcd_network_snapshot_receive_inflights_total"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 15:12:08 -07:00
Gyuho Lee
789ff21b18
Merge pull request #10570 from sbenderli/cherry-pick-of-#8334
raft: cherry pick of #8334 to release-3.3
2019-07-23 11:42:42 -07:00
Gyuho Lee
d12f13279f
Merge pull request #10827 from yznima/pr-race-3.3
Raft HTTP: fix pause/resume race condition
2019-07-23 10:59:02 -07:00
Nima Yahyazadeh
9f1d6ca1c9 Raft HTTP: fix pause/resume race condition
(cherry picked from commit b1812a410fbca6fb77bf95b496408c7b75d0a370)
2019-06-17 13:33:27 -04:00
Gyuho Lee
5832014353
Merge pull request #10793 from jingyih/automated-cherry-pick-of-#10788-origin-release-3.3
Automated cherry pick of #10788 on release-3.3
2019-06-05 14:39:55 -07:00
Jingyi Hu
d005486359 ctlv3: add missing newline in EndpointHealth
To make the output consistent with the output before #9540.
2019-06-05 14:36:57 -07:00
Gyuho Lee
89429703db
Merge pull request #10782 from jingyih/cherrypick_9540_to_release3p3
ctlv3: cherry pick of #9540 to release 3.3
2019-06-04 09:55:19 -07:00
Gyuho Lee
f835a85965 ctlv3: support "write-out" for "endpoint health" command
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2019-06-03 17:01:54 -07:00
Gyuho Lee
b0babe5d1e
Merge pull request #10718 from rohitsardesai83/release-3.3
etcd: Replace ghodss/yaml with sigs.k8s.io/yaml in 3.3
2019-05-29 13:47:56 -07:00
Rohit Sardesai
8ed3e70d7c etcd: Replace ghodss/yaml with sigs.k8s.io/yaml 2019-05-29 23:03:16 +05:30
Gyuho Lee
98d3084268 version: bump up 3.3.13
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
v3.3.13
2019-05-02 10:22:46 -07:00
Gyuho Lee
b7001c05bc clientv3: fix race condition in "Endpoints" methods
From https://github.com/etcd-io/etcd/pull/10595.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-05-02 10:17:58 -07:00
Gyuho Lee
f179d4d6a3 etcdserver: improve heartbeat send failures logging
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-05-02 10:02:28 -07:00
Luc Perkins
c46aa44143
Documentation metadata for 3.3 branch (#10692)
* Update Documentation folder

Signed-off-by: lucperkins <lucperkins@gmail.com>

* Re-add README file

Signed-off-by: lucperkins <lucperkins@gmail.com>
2019-04-30 14:03:05 -07:00
Davanum Srinivas
ad7c2cddb0 vendor: add missing files
Change-Id: I53b30e9317de6cd058833d743bc88c46686cea20
2019-04-25 15:45:49 -04:00
Davanum Srinivas
6499c14cb6 vendor: Run scripts/updatedeps.sh to cleanup unused code 2019-04-25 15:45:49 -04:00
Davanum Srinivas
6e91e3559c client: Switch to case sensitive unmarshalling to be compatible with ugorji
Using lessons learned from k8s changes:
https://github.com/kubernetes/kubernetes/pull/65034

Change-Id: Ia17a8f94ae6ed00c5af2595c2b48d3c9a0344427
2019-04-25 15:45:49 -04:00
Davanum Srinivas
7ff7e0aadd *: update bill-of-materials
Change-Id: Ibfa24e28cacd58388f7606a945c8ac35e1c34580
2019-04-25 15:45:49 -04:00
Davanum Srinivas
02ccf2013d vendor: Add json-iterator and its dependencies
Change-Id: I1f3fc00f95efadd6da9b4c248156f8460ae0ff97
2019-04-25 15:45:49 -04:00
Davanum Srinivas
20bd0c064c scripts: Remove generated code and script
Change-Id: Iac4601443bcad71920fd96b97bfe21c16116577a
2019-04-25 15:45:49 -04:00
Davanum Srinivas
69e0daf809 client: Replace ugorji/codec with json-iterator/go
We need to use the stdlib-compatible one that is case-sensitive, etc

Change-Id: Id0df573a70e09967ac7d8c0a63d99d6a49ce82f1
2019-04-25 15:45:49 -04:00
Joe Betz
5f4a45596e
Merge pull request #10656 from jpbetz/automated-cherry-pick-of-#10646-release-3.3
Automated cherry pick of #10646
2019-04-18 14:10:02 -07:00
Yingnan Zhang
38bf1bdbe0
mvcc: fix db_compaction_total_duration_milliseconds 2019-04-17 16:31:06 -07:00
Shreyas Rao
e206a8b495 wal: Add test for Verify
Signed-off-by: Shreyas Rao <shreyas.sriganesh.rao@sap.com>
2019-04-12 06:56:08 -04:00
shreyas-s-rao
cf4836fb2c wal: add Verify function to perform corruption check on wal contents
Signed-off-by: Shreyas Rao <shreyas.sriganesh.rao@sap.com>
2019-04-12 06:56:08 -04:00
Sam Batschelet
43386ac29b *: Change gRPC proxy to expose etcd server endpoint /metrics
This PR resolves an issue where the `/metrics` endpoints exposed by the proxy were not returning metrics of the etcd members servers but of the proxy itself.

Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-04-11 17:07:40 -04:00
Sam Batschelet
332e995ccd travis: fix tests by using proper code path
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-04-11 16:19:36 -04:00
Gyuho Lee
ad5e169dcf
Merge pull request #10597 from purpleidea/3.3/fatal-corruption
etcdserver: Use panic instead of fatal on no space left error
2019-03-29 14:54:46 -07:00
James Shubin
7814718c73 etcdserver: Use panic instead of fatal on no space left error
When using the embed package to embed etcd, sometimes the storage prefix
being used might be full. In this case, this code path triggers, causing
an: `etcdserver: create wal error: no space left on device` error, which
causes a fatal. A fatal differs from a panic in that it also calls
os.Exit(1). In this situation, the calling program that embeds the etcd
server will be abruptly killed, which prevents it from cleaning up
safely, and giving a proper error message. Depending on what the calling
program is, this can cause corruption and data loss.

This patch switches the fatal to a panic. Ideally this would be a
regular error which would get propagated upwards to the StartEtcd
command, but in the meantime at least this can be caught with recover().

This fixes the most common fatal that I've experienced, but there are
surely more that need looking into. If possible, the errors should be
threaded down into the code path so that embedding etcd can be more
robust.

Fixes: https://github.com/etcd-io/etcd/issues/10588

This is a cherry-picked version of upstream: 368f70a37cf25b432f01921d3f05a3bc0357297a
2019-03-29 17:45:48 -04:00
shawnli
ec22eb908a raft: cherry pick of #8334 to release-3.3 2019-03-21 16:02:30 -04:00
Gyuho Lee
c6964428ff travis.yml: update Go 1.10.8
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-02-07 10:45:15 -08:00
Gyuho Lee
d57e8b8d97 version: 3.3.12
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
v3.3.12
2019-02-07 10:41:58 -08:00
Iskander Sharipov
e634184dc6 etcdctl: fix strings.HasPrefix args order
Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2019-02-07 10:41:44 -08:00
Gyuho Lee
410a879601 version: 3.3.11+git
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-02-07 10:41:33 -08:00
Gyuho Lee
2cf9e51d2a version: 3.3.11
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
v3.3.11
2019-01-11 11:12:25 -08:00
Sam Batschelet
15903736d5 auth: fix cherry-pick
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-01-09 13:10:32 -05:00
Sam Batschelet
c7f744d6d3 auth: disable CommonName auth for gRPC-gateway
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-01-08 21:01:25 +00:00
Gyuho Lee
e6b2f00047
Merge pull request #10335 from gyuho/release-3.3-patch
[Cherry pick 3.3] grpcproxy: fix memory leak
2018-12-17 20:37:04 -08:00
Igor German
59cc0f9ac5 grpcproxy: fix memory leak
use set instead of slice as interval value

fixes #10326
2018-12-17 19:00:57 -08:00
Gyuho Lee
3a7b8b31fd travis: use Go 1.10.7
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-12-17 19:00:22 -08:00