Anthony Romano
8516d8ccc5
backend: force initial mmap size to 0 for windows
...
boltdb on windows allocates a file with the full mmap size even if the
db is empty. Force the initial mmap size to 0 so there's no huge initial
db file on windows.
Fixes #7910
2017-05-12 14:34:07 -07:00
fanmin shi
8468b38631
backend: dynamically set snapshotWarningTimeout based on db size
2017-05-11 15:25:35 -07:00
fanmin shi
230106dd3c
backend: add prometheus metric for large snapshot duration.
...
FIXES #7878
2017-05-05 17:27:33 -07:00
fanmin shi
f7f30f2361
backend: print snapshotting duration warning every 30s
...
FIXES #7870
2017-05-04 16:41:03 -07:00
Gyu-Ho Lee
161c7f6bdf
Merge pull request #7579 from gyuho/fix-defrage
...
*: fix panic during defrag operation
2017-03-23 10:08:33 -07:00
Anthony Romano
7ef75e373a
Merge pull request #7525 from heyitsanthony/big-backend
...
etcdserver, backend: configure mmap size based on quota
2017-03-23 10:06:00 -07:00
Gyu-Ho Lee
26abd25cd3
mvcc/backend: hold 'readTx.Lock' until completing bolt.Tx reset
...
Fix https://github.com/coreos/etcd/issues/7526 .
When resetting `bolt.Tx` in `defrag` and `batchTxBuffered.commit`
operation, we do not hold `readTx` lock, so the inflight range
requests can trigger panic in `mvcc.Range` paths. This fixes by
moving mutexes out and hold it while resetting the `readTx`.
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-03-23 09:47:43 -07:00
Xiang Li
7698a2a546
Merge pull request #7553 from xiang90/fix_defrag
...
backend: add FillPercent option
2017-03-21 11:16:17 -07:00
Xiang
95870a21eb
backend: add FillPercent option
2017-03-21 08:06:03 -07:00
Anthony Romano
8a3fee15a3
etcdserver, backend: only warn if exceeding max quota
2017-03-17 15:38:57 -07:00
Anthony Romano
5e4b008106
*: base initial mmap size on quota size
2017-03-17 15:38:49 -07:00
Anthony Romano
2f1542c06d
*: use filepath.Join for files
2017-03-16 07:46:06 -07:00
Anthony Romano
8d438c2939
backend: readtx
...
ReadTxs are designed for read-only accesses to the backend using a
read-only boltDB transaction. Since BatchTx's are long-running
transactions, all writes to BatchTx will writeback to ReadTx, overlaying
the base read-only transaction.
2017-03-08 20:52:59 -08:00
Xiang Li
962433c17f
*: set repo correctly for logging
2016-10-03 17:03:22 +08:00
Xiang Li
ef9754910e
mvcc: do not hash consistent index
2016-06-28 09:36:26 -07:00
Nikita Vetoshkin
dbc7c2cf4e
backend: reuse timer in run().
...
Benchmarks:
```
import (
"testing"
"time"
)
func BenchmarkTimeAfter(b *testing.B) {
b.ReportAllocs()
for n := 0; n < b.N; n++ {
select {
case <- time.After(1 * time.Millisecond):
}
}
}
func BenchmarkTimerReset(b *testing.B) {
b.ReportAllocs()
t := time.NewTimer(1 * time.Millisecond)
for n := 0; n < b.N; n++ {
select {
case <- t.C:
}
t.Reset(1 * time.Millisecond)
}
}
```
Running reveals that each loop results in 3 allocs:
```
BenchmarkTimeAfter-4 2000 1112134 ns/op 192 B/op 3 allocs/op
BenchmarkTimerReset-4 2000 1109774 ns/op 0 B/op 0 allocs/op
```
2016-06-23 18:49:41 +05:00
Gyu-Ho Lee
bf8cf39daf
mvcc: use capnslog
2016-05-20 22:31:22 -07:00
Gyu-Ho Lee
9d9f02c1ee
mvcc: update LICENSE header
2016-05-12 20:50:33 -07:00
Anthony Romano
b7ac758969
*: rename storage package to mvcc
2016-04-25 15:25:51 -07:00