Commit Graph

4041 Commits (dcf34c0ab4619f401bd72b31fa98b8288c80fec9)

Author SHA1 Message Date
Xiang Li 10ebf1a335 raft: fix memoryStorage append 2014-11-24 16:36:59 -08:00
Xiang Li 2876c652ab raft: fix for go vet 2014-11-24 15:00:38 -08:00
Xiang Li d69e4dbe6d etcdserver: initial index to 1 2014-11-24 14:57:08 -08:00
Xiang Li 453133977d etcdserver: save snapshot only if the index is greater than previous snap index 2014-11-24 14:47:59 -08:00
Xiang Li 4b7af29c37 etcdserver: fix TriggerSnap test.
Sleep for millisecond to allow the server to apply the first nop and
first put separately.
2014-11-24 14:47:49 -08:00
Yicheng Qin cfb96de413 Merge pull request #1770 from yichengq/230
*: set read/write timeout for raft transport and listener
2014-11-24 14:01:57 -08:00
Yicheng Qin 1e797c1e38 rafthttp: limit the data size read from connection each time 2014-11-24 13:54:45 -08:00
Yicheng Qin 3e55834c38 *: set read/write timeout for raft transport and listener 2014-11-24 13:46:44 -08:00
Yicheng Qin ad58122e3c pkg/transport: fix dialer typo 2014-11-24 13:35:46 -08:00
Yicheng Qin 400e573013 rafthttp: log start and stop of streaming 2014-11-24 13:35:46 -08:00
Xiang Li 62a8df304a raft: fix error message in TestLogRestore 2014-11-24 11:10:02 -08:00
Xiang Li e8afdcfe0a raft: refactor testUnstableEnts 2014-11-24 10:40:38 -08:00
Xiang Li 08f156a1de etcdserver: remove extra empty line in snapshot func 2014-11-24 10:27:18 -08:00
Xiang Li 3dd4c458ca raft: refactor term in log.go 2014-11-24 10:13:56 -08:00
Xiang Li 94190286ff raft: add comment for append in unstableEntries in log.go 2014-11-24 09:05:40 -08:00
Xiang Li 0a46c70f5d raft: use empty slice in unstableEntries in log.go 2014-11-24 09:04:45 -08:00
Xiang Li bc0e72acb9 raft: clean up panic in log.go 2014-11-24 09:01:25 -08:00
Xiang Li f3cef87c69 raft: remove extra empty line in log.go 2014-11-24 08:43:34 -08:00
Xiang Li 6c8e294d20 test: longer test timeout 2014-11-24 08:37:26 -08:00
Xiang Li bdbafe2cf3 raft: use max in log.slice 2014-11-24 08:36:15 -08:00
Xiang Li bb640e326d Merge pull request #1773 from xiang90/header
pkg/transport: add copyright header
2014-11-24 00:40:30 -08:00
Xiang Li c72221a691 pkg/transport: add copyright header 2014-11-24 00:39:55 -08:00
Xiang Li c6cbea451a Merge pull request #1771 from xiang90/listener
pkg/transport: add timeout dailer and timeout listener
2014-11-23 23:00:54 -08:00
Xiang Li 35e6df6d0a integration: longer request timeout for slow travis 2014-11-23 22:53:05 -08:00
Xiang Li da1ff2d2bb pkg/transport: add timeout dailer and timeout listener 2014-11-23 21:18:34 -08:00
Xiang Li 68e79868cc Merge pull request #1768 from xiang90/batcher
rafthttp: add batcher
2014-11-23 12:08:00 -08:00
Xiang Li 91bfead9e9 rafthttp: add batcher
After we enable streaming, there will be a large amount of msgAppResp due to high
rate msgApp. We should batch msgAppResp in a meanful way.
2014-11-23 12:05:42 -08:00
Ben Darnell 9ddd8ee539 Rename Storage.HardState back to InitialState and include ConfState.
This fixes integration/migration_test.go (and highlights the fact that
we need some more raft-level testing of restoring from snapshots).
2014-11-21 17:22:20 -05:00
Ben Darnell 03c8881e35 Fix TestSlowNodeRestore 2014-11-21 16:40:41 -05:00
Ben Darnell 0d680d0e6b Merge remote-tracking branch 'coreos/master' into merge
* coreos/master:
  rafthttp: fix import
  raft: should not decrease match and next when handling out of order msgAppResp
  Fix migration to allow snapshots to have the right IDs
  add snapshotted integration test
  fix test import loop
  fix import loop, add set to types, and fix comments
  etcdserver: autodetect v0.4 WALs and upgrade them to v0.5 automatically
  wal: add a bench for write entry
  rafthttp: add streaming server and client
  dep: use vendored imports in codegangsta/cli
  dep: bump golang.org/x/net/context

Conflicts:
	etcdserver/server.go
	etcdserver/server_test.go
	migrate/snapshot.go
2014-11-21 15:40:11 -05:00
Ben Darnell 30690d15d9 Re-enable a few tests I had missed.
Fix integration test for the change to log entry zero.

Increase test timeouts since integration tests often take
longer than 10s for me.
2014-11-21 15:27:17 -05:00
Xiang Li 66c30f28d6 Merge pull request #1761 from xiang90/fix_raft
raft: should not decrease match and next when handling out of order msgAppResp
2014-11-20 18:12:15 -08:00
Xiang Li edcdffe11e Merge pull request #1762 from xiang90/fix_import
rafthttp: fix import
2014-11-20 18:10:49 -08:00
Xiang Li 264a63be80 rafthttp: fix import 2014-11-20 18:05:45 -08:00
Xiang Li 063c5c77a0 raft: should not decrease match and next when handling out of order msgAppResp 2014-11-20 17:58:23 -08:00
Brian Waldon c0fb1c8a00 Merge pull request #1755 from bcwaldon/golang.org-deps
Switch to golang.org/x/net/context
2014-11-20 16:26:14 -08:00
Barak Michener 5139257b8d Merge pull request #1743 from barakmich/auto_upgrade
etcdserver: autodetect v0.4 WALs and upgrade them to v0.5 automatically
2014-11-20 17:20:34 -05:00
Barak Michener ce82a3e7ad Fix migration to allow snapshots to have the right IDs 2014-11-20 16:49:34 -05:00
Xiang Li 53fbf0f333 Merge pull request #1760 from xiang90/wal
wal: add a bench for write entry
2014-11-20 13:16:37 -08:00
Barak Michener 2d5ccf12ef add snapshotted integration test 2014-11-20 15:38:08 -05:00
Barak Michener d1e7fee3ca fix test import loop 2014-11-20 15:38:08 -05:00
Barak Michener 59a0c64e9f fix import loop, add set to types, and fix comments 2014-11-20 15:38:08 -05:00
Barak Michener 78ea3335bf etcdserver: autodetect v0.4 WALs and upgrade them to v0.5 automatically 2014-11-20 15:38:08 -05:00
Xiang Li d0dd205b0e wal: add a bench for write entry 2014-11-20 12:07:17 -08:00
Yicheng Qin aca195f3ad Merge pull request #1746 from yichengq/229
rafthttp: streaming server and client
2014-11-20 11:42:00 -08:00
Yicheng Qin 9d53b94546 rafthttp: add streaming server and client 2014-11-20 11:34:50 -08:00
Brian Waldon da5538b8c7 dep: use vendored imports in codegangsta/cli 2014-11-20 10:19:13 -08:00
Brian Waldon 9a728a127a dep: bump golang.org/x/net/context
Move from code.google.com/p/go.net/context to
golang.org/x/net/context before bumping to latest.
2014-11-20 10:19:12 -08:00
Ben Darnell b29240baf0 Merge remote-tracking branch 'coreos/master' into merge
* coreos/master:
  scripts: build-docker tag and use ENTRYPOINT
  scripts: build-release add etcd-migrate
  create .godir
  raft: optimistically increase the next if the follower is already matched
  raft: add handleHeartbeat handleHeartbeat commits to the commit index in the message. It never decreases the commit index of the raft state machine.
  rafthttp: send takes raft message instead of bytes
  *: add rafthttp pkg into test list
  raft: include commitIndex in heartbeat
  rafthttp: move server stats in raftHandler to etcdserver
  *: etcdhttp.raftHandler -> rafthttp.RaftHandler
  etcdserver: rename sender.go -> sendhub.go
  *: etcdserver.sender -> rafthttp.Sender

Conflicts:
	raft/log.go
	raft/raft_paper_test.go
2014-11-19 17:05:16 -05: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