9b56e51ca7
*: regenerate proto + gofmt change
2016-10-03 15:34:34 -07:00
c26ebe3262
Merge pull request #6453 from vimalk78/wal-optimize-marshal-outside-lock
...
wal/wal.go: optimized WAL.SaveSnapshot to do Marshal outside the mutex lock
2016-10-03 11:50:11 -07:00
f5588526cc
wal: set PageWriter offset in file encoder
2016-09-28 11:03:24 -07:00
231530e0c5
wal: fix minor wording in comment
2016-09-28 09:12:31 -07:00
f4ec303d1b
wal/wal.go: modified WAL.SaveSnapshot to do the Marshal before aquiring the mutex
2016-09-28 10:35:19 +05:30
69f5b4ba79
Documentation:made watch request doc more clear
2016-09-23 23:13:55 +08:00
064411b51c
wal/wal.go : improved coverage by testing WAL.Save which causes a WAL.cut to happen
2016-09-21 16:50:55 +05:30
ccb46d2024
wal: simplify dir.Close call
2016-09-09 09:23:55 +09:00
bd7107bd4b
wal: fsync directory after wal file rename
...
Fixes #6368
2016-09-08 00:09:16 -07:00
28277b5a65
wal: use page buffered writer for writing records
...
Forces torn writes to only happen on sector boundaries.
Fixes #6271
2016-08-30 15:49:07 -07:00
69ed560fae
wal: document grammar correction
...
Corrected grammar mistake for doc.go
2016-08-30 00:50:02 +05:30
af4f82228c
wal: hold file lock while renaming WAL directory on non-Windows
...
Windows requires this lock to be released before the directory is
renamed. But on unix-like operating systems, releasing the lock and
trying to reacquire it immediately can be flaky if a process is forked
around the same time. The file descriptors are marked as close-on-exec
by the Go runtime, but there is a window between the fork and exec where
another process will be holding the lock.
2016-08-26 09:27:51 -07:00
f1ead43482
wal: zero out wal tail past its first zero record
...
Whenever the WAL is opened for writes, it should write zeroes to its tail
starting from the first zero record. Otherwise, if there are entries past
the first zero record due to a torn write, any new writes that overlap the
old entries will lead to a garbage record on the tail and cause a CRC
mismatch.
2016-08-25 14:24:46 -07:00
0d8d9a374c
wal: test for truncation on torn writes
2016-08-25 14:24:46 -07:00
2b996b6038
wal: Export SegmentSizeBytes as a variable
...
In test situations, it's useful to create smaller than usual WAL files
to test rotation and to avoid the overhead of preallocation on old-style
filesystems that don't handle it efficiently. This commit changes
segmentSizeBytes to an exported variable so that tests can override it
from an init() function.
2016-08-09 15:38:30 -07:00
982e18d80b
*: regenerate proto with latest grpc-gateway
2016-07-27 13:21:03 -07:00
fffa484a9f
*: regenerate proto for adding deleterange
2016-07-23 16:17:44 -07:00
50be793f09
*: regenerate proto
2016-07-18 09:33:32 -07:00
5991209c2d
wal: release wal locks before renaming directory on init
...
Fixes #5852
2016-07-02 12:14:37 -07:00
6cfc03a5f9
wal: use CreateDirAll
2016-06-22 15:57:55 -07:00
5a7b7f7595
main: add grpc-gateway support
...
Now etcd can serve HTTP json request at /v3alpha/
2016-06-14 17:09:06 -07:00
b4aa4607cb
wal: use bytes.Equal, other minor updates
...
- Replace reflect.Equal with bytes.Equal where possible
- Remove some TODOs
- Some minor simplifications
2016-06-13 01:33:53 -07:00
3243795522
wal: simplify boolean return
2016-06-11 10:36:52 -07:00
4570eddc2c
wal: PrivateFileMode/DirMode as in pkg/fileutil
...
To make it consistent with pkg/fileutil
2016-06-10 15:20:57 -07:00
39eaa37dcf
wal: warn if sync exceeds a second
2016-06-08 11:03:18 -07:00
1610391449
*: following changes for proto update
2016-06-07 13:33:03 -07:00
7f461b2df9
Merge pull request #5572 from heyitsanthony/fallocate-eintr-fallback
...
pkg/fileutil: fall back to truncate() if fallocate is interrupted
2016-06-06 15:24:42 -07:00
5be39d2c84
wal: don't preallocate on old tail file
...
Code is only there to handle an edge case where the tail wasn't preallocated
already (e.g., via old etcd version or a crash). It also triggers tmpfs
corruption, so remove it.
2016-06-06 11:31:25 -07:00
008081ffb5
wal: minor fixes
...
- remove unnecessary type cast
- simply modulo operations
2016-06-06 09:43:19 -07:00
05cc3c3dbb
wal: limit number of tmp file names
...
This fixes a space leak if the etcd server is restarted in shorter and shorter
intervals causing the tmp files to stack up.
2016-05-31 06:25:23 -07:00
71a9d6fc8b
wal: don't warn when opening wal directory with stale tmp files
2016-05-31 06:25:23 -07:00
4a5befc2de
wal: update LICENSE header
2016-05-12 20:50:04 -07:00
17391336af
wal: atomically initialize wal directory
...
Fixes #5270
2016-05-11 16:50:17 -07:00
0fb7cb8b00
*: add disk operation metrics for monitoring
2016-05-11 09:36:45 -07:00
cd9e6a1d4f
wal: lock WAL file while repairing
2016-05-06 16:57:55 -07:00
774030e1b2
wal: repair torn writes
...
Fixes #5230
2016-05-06 16:54:08 -07:00
98031a3b6e
Merge pull request #5249 from xiang90/metrics
...
*: add metrics for grpc api
2016-05-05 14:19:46 -07:00
063307ec0a
*: add metrics for grpc api
2016-05-05 13:45:52 -07:00
015acabdbb
*: rerun genproto -g
2016-05-02 23:02:31 -07:00
67645095e9
*: add debugging metrics
2016-04-26 09:52:56 -07:00
b7ac758969
*: rename storage package to mvcc
2016-04-25 15:25:51 -07:00
4b31acf0e0
*: update generated Proto
2016-04-25 14:08:33 -07:00
8b6de5f85d
fileutil: Sync on HFS/OSX needs to be handled differently.
...
A call file.Sync on OSX doesn't guarantee actual persistence on
physical drive media as the data can be cached in physical drive's
buffers. Hence calls to file.Sync need to be replaced with
fcntl(F_FULLFSYNC).
2016-04-18 21:49:04 -07:00
641a1a66e1
*: fix govet -shadow in go tip
2016-04-15 07:39:52 -07:00
7a2ef3eb00
*: regenerate proto buffers
2016-04-13 16:24:07 -07:00
1044fbce2c
etcdctlv3: update aunto generated files
2016-04-12 22:48:47 +08:00
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
bfe3a3d08e
wal: fix tail corruption
...
On ReadAll, WAL seeks to the end of the last record in the tail. If the tail did not
end with preallocated space, the decoder would report 0 as the last offset and begin
writing at offset 0 of the tail.
Fixes #4903
2016-04-01 15:05:52 -07:00
bd832e5b0a
*: migrate Godeps to vendor/
2016-03-22 17:10:28 -07:00
0df732c052
wal: pre-create segment files
...
Pipeline file creation and allocation so it overlaps writes to the log.
Fixes #4773
2016-03-21 11:56:53 -07:00