6838 Commits

Author SHA1 Message Date
Xiang Li
53792ccbdc wal: never leave a corrupted wal file
If the process dies during wal.cut(), it might leave a corrupted wal
file. This commit solves the problem by creating a temp wal file first,
then atomically rename it to a wal file when we are sure it is vaild.
2015-04-08 15:57:20 -07:00
Yicheng Qin
2141308524 Merge pull request #2631 from yichengq/metrics-fd
etcdserver: metrics and monitor number of file descriptor
2015-04-08 11:28:58 -07:00
Yicheng Qin
7a7e1f7a7c etcdserver: metrics and monitor number of file descriptor
It exposes the metrics of file descriptor limit and file descriptor used.
Moreover, it prints out warning when more than 80% of fd limit has been used.

```
2015/04/08 01:26:19 etcdserver: 80% of the file descriptor limit is open
[open = 969, limit = 1024]
```
2015-04-08 11:17:48 -07:00
Yicheng Qin
252a931666 Merge pull request #2642 from yichengq/protect-wal
wal: allow at most one WAL function called at one time
2015-04-08 09:42:00 -07:00
Yicheng Qin
44de670de7 wal: allow at most one WAL function called at one time
SaveSnap and Save are called in separate goroutines now. Allow at most
one WAL function being called at one time to protect internal fields and
guarantee execution order.
Or one possible bug is that the new cut file is started with snapshot
entry instead of crc entry.
2015-04-08 00:34:30 -07:00
Yicheng Qin
91e9a24289 scripts: not put etcd-migrate into release dir
etcd-migrate has been integrated with etcd, and there is no need to put
it into release dir any more.
2015-04-07 16:04:52 -07:00
Xiang Li
c66777f80f Merge pull request #2640 from xiang90/import
etcdctl: refactor message in import command
2015-04-07 15:09:34 -07:00
Xiang Li
8c0b01d35b etcdctl: refactor message in import command 2015-04-07 15:08:07 -07:00
Xiang Li
1b4bcedf99 Merge pull request #2637 from bakins/proxy-randomize-endpoints
proxy: shuffle endpoints
2015-04-07 14:12:50 -07:00
Brian Akins
1fa511b995 Clarify that it is the proxy doing the shuffle. 2015-04-07 17:05:17 -04:00
Xiang Li
74fd2b0536 Merge pull request #2638 from xiang90/import
etcdctl: import hidden keys
2015-04-07 12:53:18 -07:00
Xiang Li
2c647409b9 etcdctl: import hidden keys 2015-04-07 12:41:05 -07:00
Brian Akins
e1622cd22c proxy: shuffle endpoints
Shuffle endpoitns to avoid being "stuck" to a single cluster member.
2015-04-07 15:40:29 -04:00
Xiang Li
8e9f2bb9e6 Merge pull request #2634 from xiang90/client-new
client: add dir/ttl fields into node
2015-04-07 09:11:19 -07:00
Xiang Li
ec1fab3dc1 Merge pull request #2635 from yichengq/fix-doc
docs: fix broken link for migration tool
2015-04-07 09:03:30 -07:00
Yicheng Qin
552acd8c37 docs: fix broken link for migration tool 2015-04-06 22:55:37 -07:00
Xiang Li
666a97271d client: add dir/ttl fields into node 2015-04-06 21:47:20 -07:00
Yicheng Qin
374a18130a Merge pull request #2629 from crawford/ports
*: update to use IANA-assigned ports
2015-04-06 13:57:18 -07:00
Alex Crawford
d9ad6aa2a9 *: update to use IANA-assigned ports 2015-04-06 13:49:43 -07:00
Yicheng Qin
739db062d4 Merge pull request #2630 from yichengq/remove-coreos-pkg
pkg: remove unused pkg/coreos
2015-04-06 13:41:03 -07:00
Yicheng Qin
2b830dd64b pkg: remove unused pkg/coreos
The package was used in upgrade path, and is not used anywhere now.
2015-04-06 13:33:42 -07:00
Yicheng Qin
7d10385ec6 Merge pull request #2617 from yichengq/add-tls-test
integration: add TestTLSClusterUsingDiscovery and TestDoubleTLSCluster
2015-04-06 09:46:08 -07:00
Yicheng Qin
51548acb4f rafthttp: reduce allocs in msgappv2
The patch decreases the allocs when sending one AppEntry in msgappv2
stream from 30 to 9. This helps reduce CPU load when etcd is under
high write load.
2015-04-06 09:45:39 -07:00
Xiang Li
27083093d3 Merge pull request #2627 from mateusbraga/patch-2
osutil: fix InterruptHandler comment position
2015-04-04 09:06:55 -07:00
Mateus Braga
cec8466ad2 osutil: fix InterruptHandler comment position 2015-04-04 11:32:42 -04:00
Yicheng Qin
c777516a5d Merge pull request #2620 from yichengq/new-rafthttp-msgapp
rafthttp: introduce msgappv2 stream format
2015-04-03 17:13:05 -07:00
Yicheng Qin
0d88e0d111 rafthttp: introduce msgappv2 stream format
msgappv2 stream is used to send all MsgApp, and replaces the
functionality of msgapp stream. Compared to v1, it has several
advantanges:
1. The output message is exactly the same with the input one, which
cannot be done in v1.
2. It uses one connection to stream persistently, which prevents message
reorder and saves the time to request stream.
3. It transmits 10 addiontional bytes in the procedure of committing one
proposal, which is trivia for idle time.
4. It transmits less bytes when committing mutliple proposals or keep
committing proposals.
2015-04-03 17:08:56 -07:00
Yicheng Qin
89495f9194 Merge pull request #2626 from yichengq/fix-raft-status
raft: generate correct json-format status
2015-04-03 13:54:46 -07:00
Yicheng Qin
fa96e64b43 Merge pull request #2624 from yichengq/fix-raft-storage
raft: lock storage when compact it
2015-04-03 13:51:06 -07:00
Yicheng Qin
3d32c059dd raft: generate correct json-format status
Current json-format string misses the double quote around status field.

Use %q for better clearance.
2015-04-03 13:49:46 -07:00
Yicheng Qin
422cb7cb06 Merge pull request #2621 from yichengq/fix-inflight
raft: fix freeTo fails to free
2015-04-03 13:28:29 -07:00
Yicheng Qin
d91ea7f199 raft: fix freeTo fails to free
If freeTo is called when to is set to the lastest inflight, freeTo
fails to free the slots.
2015-04-03 13:21:26 -07:00
Yicheng Qin
c6de464587 raft: lock storage when compact it
etcd now compact raft storage asynchronously, and append entry to raft
storage may happen at the same time. Add the lock to fix the bug that
the entries saved in storage may be organized in a wrong way.
2015-04-03 11:38:01 -07:00
Xiang Li
471aa1aa89 Merge pull request #2622 from xiang90/fix_watcher
store: fix watcher removal
2015-04-03 10:39:03 -07:00
Xiang Li
999917010d store: fix watcher removal 2015-04-03 10:13:43 -07:00
Kelsey Hightower
c38a6a38bb Merge pull request #2619 from kelseyhightower/update-docker-docs
Documentation: update docker docs to use new image and mount certs
2015-04-02 13:39:24 -07:00
Kelsey Hightower
3db33d19e9 Documentation: update docker docs to use new image and mount certs 2015-04-02 13:22:27 -07:00
Yicheng Qin
73936d1874 integration: add TestDoubleTLSCluster 2015-04-02 10:08:40 -07:00
Yicheng Qin
ccb0934e22 integration: add TestTLSClusterUsingDiscovery 2015-04-02 00:01:39 -07:00
Yicheng Qin
39633850d1 Merge pull request #2610 from yichengq/add-tls-test
integration: add TestTLSClusterOf3
2015-04-01 21:57:44 -07:00
Yicheng Qin
d2efa2a615 integration: add TestTLSClusterOf3 2015-04-01 20:55:00 -07:00
Yicheng Qin
a719f78046 Merge pull request #2616 from yichengq/stop-raft
etcdserver: stop raft node goroutine before stop server
2015-04-01 11:53:24 -07:00
Yicheng Qin
9e5743c816 etcdserver: stop raft node goroutine before stop server
Stop raftNode goroutine before stopping server goroutine, so
server.Stop does stop all underlying stuffs elegantly now. This fixes
the problem that previous-round lock on WAL may not be released when
etcd is restarted.
2015-04-01 11:20:51 -07:00
Yicheng Qin
2c7a8c2216 Merge pull request #2615 from yichengq/fix-upgrade-test
integration: fix upgrade test
2015-04-01 09:44:01 -07:00
Yicheng Qin
f3baf4517b integration: fix upgrade test
Upgrade test listens on a fixed port, which may fail with 'bind address
already in use' if the port was just used to send tcp sockets.

The commit makes it listen on a random available port to avoid this.
2015-03-31 16:17:58 -07:00
Barak Michener
9ad2eaf16c Merge pull request #2614 from barakmich/typos
etcdctl: fix import typos
2015-03-31 16:43:43 -04:00
Barak Michener
ad7a12066f etcdctl: fix import typos 2015-03-31 16:41:35 -04:00
Yicheng Qin
8ac7639459 Merge pull request #2612 from yichengq/fix-isolate
pkg/netutil: fix DropPort and RecoverPort in linux
2015-03-31 11:58:12 -07:00
Xiang Li
a4fefd7f73 Merge pull request #2613 from xiang90/fix_import
etcdctl: wait for goroutine existing
2015-03-31 11:56:35 -07:00
Xiang Li
1024f587e0 etcdctl: main routine of import command should wait for goroutine existing 2015-03-31 11:55:19 -07:00