66 Commits

Author SHA1 Message Date
James Blair
a91bacf567
Formatted source code for go 1.19.6.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-02-20 12:44:14 +13:00
Tobias Schottdorf
b9c051e7a7 raftpb: clean up naming in ConfChange 2019-07-23 10:40:03 +02:00
Tobias Schottdorf
10680744b9 raft: introduce protos for joint quorums 2019-07-23 10:39:48 +02:00
Gyuho Lee
bcd5390b35 *: regenerate protobuf, grpc-gateway
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-07 21:31:13 -08:00
siddontang
c6f2db2e92 raft: support learner 2017-11-11 10:38:21 +08:00
Anthony Romano
4ebeba0e18 *: regen protofiles with latest protobuf tools 2017-06-12 15:14:43 -07:00
Anthony Romano
78a5eb79b5 *: add swagger and grpc-gateway assets for v3lock and v3election 2017-04-10 15:21:07 -07:00
Gyu-Ho Lee
b8b72f80f9 *: revendor, update proto files 2016-11-10 12:02:00 -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
Ben Darnell
73cae7abd0 raft: Implement the PreVote RPC described in thesis section 9.6
This prevents disruption when a node that has been partitioned
away rejoins the cluster.

Fixes #6522
2016-10-19 19:35:20 +08:00
Gyu-Ho Lee
9b56e51ca7 *: regenerate proto + gofmt change 2016-10-03 15:34:34 -07:00
ychen11
69f5b4ba79 Documentation:made watch request doc more clear 2016-09-23 23:13:55 +08:00
Gyu-Ho Lee
982e18d80b *: regenerate proto with latest grpc-gateway 2016-07-27 13:21:03 -07:00
Xiang Li
fffa484a9f *: regenerate proto for adding deleterange 2016-07-23 16:17:44 -07:00
Gyu-Ho Lee
50be793f09 *: regenerate proto 2016-07-18 09:33:32 -07:00
Gyu-Ho Lee
5b92e17e86 *: regenerate proto files 2016-07-15 13:24:19 -07:00
Xiang Li
7432e9fbe9 Merge pull request #5809 from swingbach/master
raft: make leader transferring workable when quorum check is on
2016-07-12 09:46:18 -07:00
swingbach@gmail.com
c36a40ca15 raft: introduce top-level context in message struct 2016-07-12 16:14:06 +08:00
Jared Hulbert
90889ebc0f raftpb: atomic access alignment
The Entry struct has misaligned fields that are accessed atomically.  The
misalignment is caused by the EntryType enum which the Protocol Buffers
spec forces to be a 32bit int.

Moving the order of the fields without renumbering them in the .proto file
seems to align the go structure without changing the wire format.
2016-07-08 11:13:53 -07:00
Xiang Li
40c4a7894d *: support return prev deleted kv 2016-07-01 14:01:48 -07:00
swingbach@gmail.com
0faae33ace raft: implemented read-only query when quorum check is on 2016-06-28 10:52:53 +08:00
Gyu-Ho Lee
015acabdbb *: rerun genproto -g 2016-05-02 23:02:31 -07:00
Anthony Romano
b7ac758969 *: rename storage package to mvcc 2016-04-25 15:25:51 -07:00
Gyu-Ho Lee
4b31acf0e0 *: update generated Proto 2016-04-25 14:08:33 -07:00
Gyu-Ho Lee
7a2ef3eb00 *: regenerate proto buffers 2016-04-13 16:24:07 -07:00
mqliang
1044fbce2c etcdctlv3: update aunto generated files 2016-04-12 22:48:47 +08:00
es-chow
ac059eb8cb raft: transfer leader feature 2016-04-08 16:56:32 +08:00
Anthony Romano
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
Anthony Romano
bd832e5b0a *: migrate Godeps to vendor/ 2016-03-22 17:10:28 -07:00
Gyu-Ho Lee
a35d5889f6 *: update gRPC, proto interface 2016-01-26 17:41:39 -08:00
Xiang Li
a8cc1570d0 raft: support quorum check when raft is leader
If quorum check fails, the leader will step down to follower.
2015-11-24 09:36:37 -08:00
Xiang Li
ef7cf058a2 *: update gogoproto 2015-09-03 15:32:25 -07:00
Tamir Duberstein
45390b9fb8 *: regenerate proto to use local import path
Using Go-style import paths in protos is not idiomatic. Normally, this
detail would be internal to etcd, but the path from which gogoproto
is imported affects downstream consumers (e.g. cockroachdb).

In cockroach, we want to avoid including `$GOPATH/src` in our protoc
include path for various reasons. This patch puts etcd on the same
convention, which allows this for cockroach.

More information: https://github.com/cockroachdb/cockroach/pull/2339#discussion_r38663417

This commit also regenerates all the protos, which seem to have
drifted a tiny bit.
2015-09-03 13:38:28 -04:00
Xiang Li
581ef05bab *: resolve proto warnings 2015-06-29 18:39:46 -07:00
Xiang Li
13f44e4b79 *: update generated proto code 2015-06-29 16:45:25 -07:00
Xiang Li
05e240b892 *: update protobuf 2015-03-25 10:14:35 -07:00
Xiang Li
9b4d52ee73 raft: do not resend snapshot if not necessary
raft relies on the link layer to report the status of the sent snapshot.
If the snapshot is still sending, the replication to that remote peer will
be paused. If the snapshot finish sending, the replication will begin
optimistically after electionTimeout. If the snapshot fails, raft will
try to resend it.
2015-02-28 11:41:58 -08:00
Xiang Li
2af33fd494 raft: add reportUnreachable 2015-02-28 10:45:22 -08:00
Ben Darnell
2e1c36cdd9 raft: introduce MsgHeartbeatResp.
Now that heartbeats are distinct from MsgApp{,Resp}, the retries
currently performed in stepLeader's MsgAppResp section are only
performed on an actual MsgAppResp (or a new MsgProp). This means
that it may take a long time to recover from a dropped MsgAppResp
in a quiet cluster.

This commit adds a dedicated heartbeat response message. This message
does not convey the follower's current log position because the
MsgHeartbeat does not include the leaders term and index. Upon receipt
of a heartbeat response, the leader may retry the latest MsgApp if it
believes the follower to be behind.
2015-01-14 17:34:10 -05:00
Xiang Li
35b907ac58 raft: add lastIndex as rejectHint
Add the lastindex of the raft log as reject hint, so the leader can
bypass the greater index probing and decrease the next index directly
to last + 1.
2015-01-01 19:04:07 -08:00
Xiang Li
149389cbfa raft: add msgHeartbeat type 2014-12-04 08:29:31 -08:00
Ben Darnell
355ee4f393 raft: Integrate snapshots into the raft.Storage interface.
Compaction is now treated as an implementation detail of Storage
implementations; Node.Compact() and related functionality have been
removed. Ready.Snapshot is now used only for incoming snapshots.

A return value has been added to ApplyConfChange to allow applications
to track the node information that must be stored in the snapshot.

raftpb.Snapshot has been split into Snapshot and SnapshotMetadata, to
allow the full snapshot data to be read from disk only when needed.

raft.Storage has new methods Snapshot, ApplySnapshot, HardState, and
SetHardState. The Snapshot and HardState parameters have been removed
from RestartNode() and will now be loaded from Storage instead.
The only remaining difference between StartNode and RestartNode is that
the former bootstraps an initial list of Peers.
2014-11-19 16:40:26 -05:00
Xiang Li
5967794009 *: support updating advertise-peer-url
Users might want to update the peerurl of the etcd member in several cases.
For example, if the IP address of the physical machine etcd running on is
changed, user need to update the adversite-pee-rurl accordingly.
This commit makes etcd support updating the advertise-peer-url of its members.
2014-11-11 12:07:03 -08:00
Xiang Li
f64963de88 raftpb: fix proto 2014-11-10 17:05:30 -08:00
Yicheng Qin
e200d2a8e2 etcdserver/raft: remove msgDenied, removedNodes, shouldStop
The future plan is to do all these in etcdserver level.
2014-10-20 15:13:18 -07:00
Jonathan Boulle
4183b69e12 *: move from third_party to Godep 2014-10-14 00:37:52 -07:00
Yicheng Qin
32c38820c1 raft: protobuf messageType 2014-10-13 11:13:43 -07:00
Yicheng Qin
447caf1afc etcdserver/wal: record info at the head of WAL file 2014-10-10 11:57:09 -07:00
Xiang Li
af5b8c6c44 raft: int64 -> uint64 2014-10-09 14:26:43 +08:00
Xiang Li
7b61565c0a raft: save removed nodes in snapshot 2014-10-08 15:33:55 +08:00