15479 Commits

Author SHA1 Message Date
Tobias Schottdorf
8d1946d16a raft: document problem with leader self-removal
When a leader removes itself, it will retain its leadership but not
accept new proposals, making the range effectively stuck until manual
intervention triggers a campaign event.

This commit documents the behavior. It does not correct it yet.
2019-08-16 09:38:44 +02:00
Tobias Schottdorf
306e75a96f raft: add a batch of interaction-driven conf change tests
Verifiy the behavior in various v1 and v2 conf change operations.
This also includes various fixups, notably it adds protection
against transitioning in and out of new configs when this is not
permissible.

There are more threads to pull, but those are left for future commits.
2019-08-16 09:38:44 +02:00
Tobias Schottdorf
4e19150676 raft: proactively probe newly added followers
When the leader applied a new configuration that added voters, it would
not immediately probe these voters, delaying when they would be caught
up.

I noticed this while writing an interaction-driven test, which has now
been cleaned up and completed.
2019-08-14 20:53:34 +02:00
Tobias Schottdorf
3d6721f751 rafttest: add _breakpoint directive
It is a helper case to attach a debugger to when a problem needs
to be investigated in a longer test file. In such a case, add the
following stanza immediately before the interesting behavior starts:

_breakpoint:
----
ok

and set a breakpoint on the _breakpoint case.
2019-08-14 20:53:34 +02:00
Tobias Schottdorf
fdaed88f14 raft: initialize new Progress at LastIndex, not LastIndex+1
Initializing at LastIndex+1 meant that new peers would not be probed
immediately when they appeared in the leader's config, which delays
their getting caught up.
2019-08-14 20:53:34 +02:00
Tobias Schottdorf
c2d9514370 raft/rafttest: fix stabilize handler
It was bailing out too early.
2019-08-14 17:24:14 +02:00
Gyuho Lee
d047fe84ee CHANGELOG-3.3: highlight 3.3 backports
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-14 01:44:01 -07:00
Gyuho Lee
916e6b5400 CHANGELOG-3.3: add more changes
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-14 01:35:02 -07:00
Gyuho Lee
9aa27c303e CHANGELOG: update backports
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-14 01:10:49 -07:00
Gyuho Lee
fd0d43dad9 scripts/release: clean up minor tag docker commands
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 22:00:07 -07:00
Gyuho Lee
08f2685330 CHANGELOG: update 3.3 + 3.4 changes
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 21:46:09 -07:00
Gyuho Lee
5535092ce3 Makefile: explicit about GOOS in docker-test builds
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 16:56:52 -07:00
Jingyi Hu
1ea2acd9b3
Merge pull request #11032 from jingyih/changelog_add_mvcc_db_open_read_transactions
CHANGELOG-3.4: add etcd_mvcc_db_open_read_transactions
2019-08-13 15:50:08 -07:00
Jingyi Hu
a6c792dfce CHANGELOG: add etcd_mvcc_db_open_read_transactions 2019-08-13 15:34:35 -07:00
Gyuho Lee
96ce27cf5d
Merge pull request #11031 from gyuho/ccc
*: highlight "--enable-v2=false"
2019-08-13 15:32:21 -07:00
Gyuho Lee
092ee6d321 Documentation/upgrades: highlight "--enable-v2=false"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 15:23:58 -07:00
Gyuho Lee
fb7981b6e5 CHANGELOG: --enable-v2=false by default
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 15:14:16 -07:00
Gyuho Lee
170861c5c9
Merge pull request #11029 from gyuho/grpc
vendor: upgrade grpc-go to 1.23.0
2019-08-13 14:44:07 -07:00
Jingyi Hu
daa104093f
Merge pull request #11030 from jingyih/update_changelog_from_pr10523
CHANGELOG-3.4: update from 10523
2019-08-13 14:28:19 -07:00
Jingyi Hu
578ff0d416 CHANGELOG-3.4: update from 10523 2019-08-13 14:18:00 -07:00
Gyuho Lee
4e3c2e0a3a vendor: update "net/http2" to latest
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 13:35:50 -07:00
Gyuho Lee
02b2779814 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 12:57:14 -07:00
Gyuho Lee
c0161f7e7d *: use Go 1.12.8
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 12:45:12 -07:00
Gyuho Lee
fdbaf3ea9c
Merge pull request #11025 from gyuho/ccc
clientv3: use Endpoints(), fix context creation
2019-08-13 11:17:43 -07:00
Gyuho Lee
97fd40c587 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-12 21:39:50 -07:00
Gyuho Lee
8d823e70dd
Merge pull request #11018 from gyuho/yq
scripts/release: update "yq" command
2019-08-12 11:03:37 -07:00
Gyuho Lee
dd0ed3f05e CHANGELOG-3.4: add "code changes" from 3.3
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 10:23:33 -07:00
Gyuho Lee
c72fa51b2a scripts: remove ".aci" commands
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 10:20:21 -07:00
Gyuho Lee
af38185f92 scripts/release: fix version check commands
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 10:20:13 -07:00
Gyuho Lee
ac613c481f scripts: fix build docker commands, add more logging
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 10:20:05 -07:00
Gyuho Lee
7299a6a106 *: remove "acbuild"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 09:31:22 -07:00
Gyuho Lee
1f4f8ae731 scripts/release: update "yq" command
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 09:26:04 -07:00
Sahdev Zala
65e226ad92
Merge pull request #11017 from ethan-daocloud/patch-2
cleanup: correct summary message in put.go
2019-08-12 10:20:51 -04:00
ethan
b5ee1de076
cleanup: correct summary message in put.go 2019-08-12 21:13:58 +08:00
Tobias Grieger
029401ab81
Merge pull request #11005 from tbg/interactiontest
raft/rafttest: introduce datadriven testing
2019-08-12 11:52:52 +02:00
Tobias Schottdorf
e8090e57a2 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 11:13:51 +02:00
Tobias Grieger
56ad881b1b
Merge pull request #11015 from gyuho/typo
raft: fix typo
2019-08-10 17:26:29 +02:00
Jingyi Hu
8e2225b4f1
Merge pull request #11016 from ethan-daocloud/patch-1
etcd-dump-logs: correct logging message word
2019-08-10 04:56:50 -07:00
ethan
867b31e01a
etcd-dump-logs: correct logging message word
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-10 17:01:57 +08:00
Gyuho Lee
6c87b21821 raft: fix typo
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 21:26:48 -07:00
Tobias Schottdorf
f57c16c271 vendor: bump datadriven
Picks up some fixes for papercuts.
2019-08-10 00:02:59 +02:00
Gyuho Lee
4a4629fd9f
Merge pull request #10957 from Hanaasagi/fix-metric-name-typo
test: fix metric name typo
2019-08-09 13:23:26 -07:00
Gyuho Lee
5e90267d1b CHANGELOG: update 3.3 + 3.4 with raft changes
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:32:10 -07:00
Tobias Grieger
4cec8dddc6
Merge pull request #11003 from tbg/interaction/restore
raft: fix restoring joint configurations
2019-08-09 20:13:04 +02:00
Xiang Li
84c69cca76
Merge pull request #10970 from nilsocket/minorFix1
raft : remove unnecessary, if check
2019-08-09 11:03:01 -07:00
Tobias Schottdorf
37ab5bdd21 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 19:28:43 +02:00
Tobias Schottdorf
a5f785a232 confchange: clean up unnecessary block 2019-08-09 19:28:43 +02:00
Tobias Grieger
7948f39790
Merge pull request #11004 from tbg/interaction/unused-type
raft/tracker: visit Progress in stable order
2019-08-09 12:32:04 +02:00
Gyuho Lee
5ce1856cce
Merge pull request #11010 from etcd-io/wenjiaswe-patch-1
functional: Update functional test README.md
2019-08-08 20:57:26 -07:00
Wenjia
ab9e3d9829
functional: Update functional test README.md 2019-08-08 18:40:15 -07:00