Anthony Romano
54aac4ab7e
pkg/fileutil: fall back to truncate() if fallocate is interrupted
...
Fixes #5558
2016-06-06 09:52:34 -07:00
Gyu-Ho Lee
8b77de4e99
pkg: update LICENSE header
2016-05-12 20:48:53 -07:00
Gyu-Ho Lee
4ab1500a6d
pkg/fileutil: wait up to 300ms for purge test
...
Fix https://github.com/coreos/etcd/issues/5231 .
The issue shows that slow CI can take more than 200ms
for purging. This increase the loop iteration to wait
up to 300ms in case the disk is being slow.
2016-04-29 15:24:44 -07:00
Ajit Yagaty
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
Anthony Romano
d4ff9364d4
Merge pull request #4861 from heyitsanthony/nfs-lock
...
pkg/fileutil: fix linux file locks over NFS
2016-04-16 08:59:10 -07:00
Gyu-Ho Lee
b0cc0e443c
*: clean up if, bool comparison
2016-04-02 12:55:11 -07:00
Gyu-Ho Lee
3f1a1c3192
pkg/fileutil: lock file on Windows
2016-03-27 00:35:44 -07:00
Anthony Romano
877030ea9d
pkg/fileutil: fix linux file locks over NFS
...
Fixes #4853
2016-03-25 16:28:29 -07:00
Anthony Romano
bd832e5b0a
*: migrate Godeps to vendor/
2016-03-22 17:10:28 -07:00
Anthony Romano
aafe717f2f
fileutil: support file extending preallocate
2016-03-21 09:42:30 -07:00
Anthony Romano
7397e14c0a
fileutil, wal: refactor file locking
...
File lock interface was more verbose than it needed to be while
simultaneously making it difficult to support systems (e.g., Windows)
that only permit locked writes on a single fd holding the lock.
2016-03-16 15:02:15 -07:00
Xiang Li
e59efe45a1
wal: support fadatasync on linux
2016-03-13 17:22:53 -07:00
Gyu-Ho Lee
22a8bbd3b1
pkg/fileutil: clean up interface, comments
2016-03-09 09:19:56 -08:00
Anthony Romano
20461ab11a
*: fix many typos
2016-01-31 21:42:39 -08:00
Xiang Li
150e646b05
etcdserver: always check if the data dir is writable before starting etcd
2015-12-29 11:29:01 -08:00
Gyu-Ho Lee
8d368c4dba
pkg/fileutil: fix error var shadow
...
Go tip complains about error variable shadowing at
https://travis-ci.org/coreos/etcd/jobs/98636879#L291-L292 .
2015-12-23 23:56:26 -08:00
Akihiro Suda
058f1449d6
pkg/fileutil: skip TestIsDirWriteable when running as root
2015-12-24 14:52:40 +09:00
Xiang Li
96731f4525
Merge pull request #3991 from xiang90/fix_lock
...
pkg/fileutil: make TestLockAndUnlock less flaky on CI
2015-12-14 11:58:14 -08:00
Xiang Li
be3e87b238
pkg/fileutil: make TestLockAndUnlock less flaky on CI
...
CI is slow sometime. To make the test less flaky, we increases the
timeout. This does not affect the correctness, but the test might
take longer to finish or to fail.
2015-12-14 11:38:07 -08:00
Gyu-Ho Lee
4e06510280
pkg/fileutil: fix shadowed variables
2015-12-12 09:38:26 -08:00
Xiang Li
e93c07ba91
pkg/fileutil: make purge test more reliable
2015-12-09 10:34:38 -08:00
Xiang Li
77069ca16b
pkg/fileutil: make purgeTest more robust
...
1. Add a few comments to the test.
2. Provide a more robust way to check the purging
result. Tolerate slow io operations.
2015-12-02 15:12:42 -08:00
Gyu-Ho Lee
81229dbea9
*: add missing package descriptions
...
This adds and updates package descriptions in etcd projects.
And also deletes some duplicate LICENSE statements.
2015-11-17 20:54:10 -08:00
Yicheng Qin
1f0fb3d9aa
etcdserver: forbid to unset v3 demo once used
...
After enabling v3 demo, it may change the underlying data organization
for v3 store. So we forbid to unset --experimental-v3demo once it has
been used.
2015-09-14 21:27:11 -07:00
Yicheng Qin
92cd24d5bd
*: fix govet shadow check failure
2015-08-27 14:15:30 -07:00
Xiang Li
3ca5482251
pkg/fileutil: treat not support error as nil error in preallocate
2015-08-20 11:15:02 -07:00
Xiang Li
39a4b6a5e5
pkg/fileutil: support perallocate
2015-08-06 10:10:58 -07:00
Yicheng Qin
107263ef9f
pkg/fileutil: fix TestPurgeFile
...
It needs to wait longer for file to be detected and removed sometimes.
2015-06-25 10:09:20 -07:00
Xiang Li
8e7fa9e201
Merge pull request #2976 from yichengq/fix-lock-test
...
pkg/fileutil: wait longer for relock
2015-06-12 15:20:18 -07:00
Yicheng Qin
7723b91c06
pkg/fileutil: wait longer for relock
...
multiple cpu running makes it slower, so it waits longer for relock.
2015-06-12 15:17:28 -07:00
Yicheng Qin
75f91bab5c
pkg/fileutil: wait longer before checking purge results
...
multiple cpu running may be slower than single cpu running, so it may
take longer time to remove files.
Increase from 5ms to 20ms to give it enough time.
2015-06-12 14:36:15 -07:00
Xiang Li
dc87454487
fileutil: return on error and send it to error chan
2015-06-10 15:59:24 -07:00
Xiang Li
e2c2f098bc
fileutil: use leveled logging
2015-06-10 15:57:59 -07:00
mischief
2e8c932ab0
pkg/fileutil: add plan9 lockfile support
2015-05-11 13:24:01 -07:00
Alexander Kolbasov
39c7060d3b
pkg/fileutil: add filelock support for solaris
2015-04-24 12:18:08 -07:00
Jonathan Boulle
f1ed69e883
*: switch to line comments for copyright
...
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Jonathan Boulle
1ec98cb795
pkg/fileutil: sort filenames during ReadDir
2014-12-18 16:36:11 -08:00
Barak Michener
a0d72fb00c
Fix building the lock on windows
2014-12-18 18:57:11 -05:00
Xiang Li
ea94d19147
*: lock the in using files; do not purge locked the wal files
2014-12-14 19:27:22 -08:00
Xiang Li
d3db010190
*: support purging old wal/snap files
2014-12-01 11:50:17 -08:00
Kelsey Hightower
b1731f0843
etcd: ensure data dir is writable
...
etcd checks that the data dir is writable by writing and removing an
empty file to the data dir during startup and exits non-zero if that
fails.
fixes #876
2014-10-27 16:52:05 -07:00