15440 Commits

Author SHA1 Message Date
Gyuho Lee
8f85f0dc26 version: 3.4.0-rc.1
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
v3.4.0-rc.1
2019-08-15 13:45:25 -07:00
Gyuho Lee
0161e72d8d mvcc: keep 64-bit alignment in "store" struct
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-15 13:31:52 -07:00
Gyuho Lee
1691eec2db clientv3/integration: fix "mvcc.NewStore" call
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-15 13:31:46 -07:00
Joe Betz
1e213b7ab6 *: Add experimental-compaction-batch-limit flag
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-15 13:31:39 -07:00
Joe Betz
b30c1eb2c8 mvcc: Optimize compaction for short commit pauses 2019-08-15 13:29:28 -07:00
Gyuho Lee
a0be90f450 Documentation/upgrades: update
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-14 17:01:19 -07:00
Gyuho Lee
8110a96f69 scripts/release: clean up minor tag docker commands
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 22:01:10 -07:00
Gyuho Lee
8e05c73fa7 Makefile: explicit about GOOS in docker-test builds
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 16:57:22 -07:00
Gyuho Lee
970ca9fa43 Documentation/upgrades: highlight "--enable-v2=false"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 15:32:46 -07:00
Gyuho Lee
a481ee809f vendor: update "net/http2" to latest
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 14:44:59 -07:00
Gyuho Lee
4d06d3b498 vendor: upgrade grpc-go to 1.23.0
https://github.com/grpc/grpc-go/releases/tag/v1.23.0

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 14:44:53 -07:00
Gyuho Lee
98462b52d1 *: use Go 1.12.8
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 12:56:11 -07:00
Gyuho Lee
2a8d09b83b clientv3: use Endpoints(), fix context creation
If overwritten, the previous context should be canceled first.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 12:43:49 -07:00
Gyuho Lee
49c6e87f74 version: 3.4.0-pre
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 12:43:40 -07:00
Gyuho Lee
84ed0f7f87 version: 3.4.0-rc.0
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
v3.4.0-rc.0
2019-08-12 10:06:34 -07:00
Gyuho Lee
52d34298ab scripts: remove ".aci" commands
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 10:06:24 -07:00
Gyuho Lee
9c1d2eaee4 scripts/release: fix version check commands
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 09:59:24 -07:00
Gyuho Lee
547631a492 scripts: fix build docker commands, add more logging
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 09:50:21 -07:00
Gyuho Lee
802e01a0d8 *: remove "acbuild"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 09:50:21 -07:00
Gyuho Lee
1dff1c869f scripts/release: fix "yq" command
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 09:50:18 -07:00
Tobias Schottdorf
ac6b604bb8 raft/rafttest: introduce datadriven testing
It has often been tedious to test the interactions between multi-member
Raft groups, especially when many steps were required to reach a certain
scenario. Often, this boilerplate was as boring as it is hard to write
and hard to maintain, making it attractive to resort to shortcuts
whenever possible, which in turn tended to undercut how meaningful and
maintainable the tests ended up being - that is, if the tests were even
written, which sometimes they weren't.

This change introduces a datadriven framework specifically for testing
deterministically the interaction between multiple members of a raft group
with the goal of reducing the friction for writing these tests to near
zero.

In the near term, this will be used to add thorough testing for joint
consensus (which is already available today, but wildly undertested),
but just converting an existing test into this framework has shown that
the concise representation and built-in inspection of log messages
highlights unexpected behavior much more readily than the previous unit
tests did (the test in question is `snapshot_succeed_via_app_resp`; the
reader is invited to compare the old and new version of it).

The main building block is `InteractionEnv`, which holds on to the state
of the whole system and exposes various relevant methods for
manipulating it, including but not limited to adding nodes, delivering
and dropping messages, and proposing configuration changes. All of this
is extensible so that in the future I hope to use it to explore the
phenomena discussed in

https://github.com/etcd-io/etcd/issues/7625#issuecomment-488798263

which requires injecting appropriate "crash points" in the Ready
handling loop. Discussions of the "what if X happened in state Y"
can quickly be made concrete by "scripting up an interaction test".

Additionally, this framework is intentionally not kept internal to the
raft package.. Though this is in its infancy, a goal is that it should
be possible for a suite of interaction tests to allow applications to
validate that their Storage implementation behaves accordingly, simply
by running a raft-provided interaction suite against their Storage.
2019-08-12 08:10:29 -07:00
Tobias Schottdorf
69c97cdc8f vendor: bump datadriven
Picks up some fixes for papercuts.
2019-08-12 08:10:19 -07:00
ethan
faa71d89d4 cleanup: correct summary message in put.go 2019-08-12 08:07:33 -07:00
Gyuho Lee
64c16779c0 tests/e2e: pass "rc.0"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 01:46:58 -07:00
Hanaasagi
8ff71c52db test: fix metric name typo 2019-08-09 13:24:27 -07:00
Tobias Schottdorf
dbe5198c45 raft: fix restoring joint configurations
While writing interaction tests for joint configuration changes, I
realized that this wasn't working yet - restoring had no notion of
the joint configuration and was simply dropping it on the floor.

This commit introduces a helper `confchange.Restore` which takes
a `ConfState` and initializes a `Tracker` from it.

This is then used both in `(*raft).restore` as well as in `newRaft`.
2019-08-09 11:18:40 -07:00
Tobias Schottdorf
39d0f4e53c confchange: clean up unnecessary block 2019-08-09 11:18:30 -07:00
nilsocket
a8b4213ec0 raft : newRaft() does check for validity of Config 2019-08-09 11:18:06 -07:00
Tobias Schottdorf
a945379ce4 raft/tracker: visit Progress in stable order
This is helpful for upcoming testing work which allows datadriven
testing of the interaction of multiple nodes. This testing requires
determinism to work correctly.
2019-08-09 08:39:52 -07:00
Tobias Schottdorf
7a50cd7074 raft/auorum: remove unused type 2019-08-09 08:39:44 -07:00
Gyuho Lee
f786b6ba16 etcdserver: add "etcd_server_snapshot_apply_in_progress_total"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 14:02:13 -07:00
Gyuho Lee
1c8ab76333 integration: test snapshot inflights metrics
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 14:01:54 -07:00
Gyuho Lee
abdb7ca17b etcdserver/api: add "etcd_network_snapshot_send_inflights_total", "etcd_network_snapshot_receive_inflights_total"
Useful for deciding when to terminate the unhealthy follower.
If the follower is receiving a leader snapshot, operator may wait.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 14:01:45 -07:00
Zeming YU
629cb7aa5e agent: fix a data race and deadlock
add 1-size buffer for `errc`  to avoid deadlock of child goroutine
add a local variable to a void data race in `err`
when `case <-stream.Context().Done():` is taken
2019-08-08 12:23:08 -07:00
Gyuho Lee
89e102365d Documentation/op-guide: update runtime configuration
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 09:25:29 -07:00
Tobias Schottdorf
9018b3dc4d raft: let learners vote
It turns out that that learners must be allowed to cast votes.

This seems counter- intuitive but is necessary in the situation in which
a learner has been promoted (i.e. is now a voter) but has not learned
about this yet.

For example, consider a group in which id=1 is a learner and id=2 and
id=3 are voters. A configuration change promoting 1 can be committed on
the quorum `{2,3}` without the config change being appended to the
learner's log. If the leader (say 2) fails, there are de facto two
voters remaining. Only 3 can win an election (due to its log containing
all committed entries), but to do so it will need 1 to vote. But 1
considers itself a learner and will continue to do so until 3 has
stepped up as leader, replicates the conf change to 1, and 1 applies it.

Ultimately, by receiving a request to vote, the learner realizes that
the candidate believes it to be a voter, and that it should act
accordingly. The candidate's config may be stale, too; but in that case
it won't win the election, at least in the absence of the bug discussed
in:
https://github.com/etcd-io/etcd/issues/7625#issuecomment-488798263.
2019-08-08 09:10:21 -07:00
Gyuho Lee
b9bea9def7 functional/agent: copy file, instead of renaming
To retain failure logs in CI testing.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 09:09:39 -07:00
Gyuho Lee
d2675c13f4 functional/rpcpb: make client log less verbose
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 09:09:34 -07:00
Gyuho Lee
8230536171 functional.yaml: try lower snapshot count for flaky tests, error threshold
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 09:09:29 -07:00
lzhfromustc
524278c187 pkg/types: Avoid potential double lock of tsafeSet.
(tsafeSet).Sub and (tsafeSet).Equals can cause double lock bug if ts and other is pointing the same variable

gofmt the code and add some comments
2019-08-07 16:02:24 -07:00
Gyuho Lee
29cdc9abfc test: output etcd server logs when functional tests fail
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-07 10:16:44 -07:00
Zeming YU
a6a9a71b6a integration: fix a data race about err
don't share `err` between goroutines
2019-08-06 16:15:27 -07:00
Gyuho Lee
8c8f6f4b01 mvcc: fix typo in test
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-06 15:09:55 -07:00
Zeming YU
b6cfaf883b v3rpc: fix a typo err
don't read return value in child goroutine which causes data race.
2019-08-06 15:09:47 -07:00
Gyuho Lee
b522281a98 stream: Prevent panic when newAttemptLocked fails to get a transport for the new attempt
Testing https://github.com/grpc/grpc-go/pull/2958

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-06 15:09:42 -07:00
Gyuho Lee
a78793e6bf vendor: update gRPC to latest
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-06 15:09:37 -07:00
Gyuho Lee
e09528aa06
Merge pull request #10988 from wenjiaswe/automated-cherry-pick-of-#10987-upstream-release-3.4
Automated cherry pick of #10987
2019-08-05 23:31:33 -07:00
Wenjia Zhang
cb4507d15b functional:update go.etcd.io/etcd link and go image registry for functional test 2019-08-05 23:28:45 -07:00
Gyuho Lee
4cead3c25c
Merge pull request #10986 from wenjiaswe/automated-cherry-pick-of-#10985-upstream-release-3.4
Automated cherry pick of #10985
2019-08-05 22:45:31 -07:00
Wenjia
3ac41644cc functional test: Update functional README.md 2019-08-05 22:12:50 -07:00