Xiang Li
5efdd7bc6d
storage/backend: avoid creating new bolt.tx during a batchTx
2015-10-17 21:31:34 -07:00
Xiang Li
0aa2f1192a
storage: add metrics for db total size
2015-10-05 16:56:30 -07:00
Yicheng Qin
36f4303fc3
storage/etcdserver: update KV.Snapshot function
...
When using Snapshot function, it is expected:
1. know the size of snapshot before writing data
2. split snapshot-ready phase and write-data phase. so we could cut
snapshot first and write data later.
Update its interface to fit the requirement of etcdserver.
2015-10-03 10:15:23 -07:00
Xiang Li
385e17583f
storage: fix hash by iterating kv
2015-09-23 11:28:33 -07:00
Yicheng Qin
f7efbe8b14
storage/backend: extend wait timeout for commit to finish
...
It needs to take more time on travis. Fix:
```
--- FAIL: TestBackendBatchIntervalCommit (0.01s)
backend_test.go:113: bucket test does not exit
```
2015-09-16 14:14:51 -07:00
Jonathan Boulle
7848ac3979
*: add missing license headers
2015-09-15 14:09:01 -07:00
Yicheng Qin
44fd734038
storage/backend: add unit tests for backend and batchTx
2015-09-02 16:57:13 -07:00
Yicheng Qin
4b9b0cbcc1
storage: add newBackend and newBatchTx
...
This is for ease of testing.
2015-08-31 13:25:10 -07:00
Yicheng Qin
054fab84ee
storage/backend: remove startc var
...
This makes start logic cleaner.
2015-08-28 13:52:31 -07:00
Yicheng Qin
f04884f74d
storage/backend: fix off-by-one error for pending var
...
Or it may commit until batchLimit + 1.
2015-08-27 22:51:32 -07:00
Yicheng Qin
7ed929fb3d
storage/backend: fix limit doesn't effect in range
2015-08-27 22:51:32 -07:00
Matt Keller
19a28c8efd
storage: Fixed backend test
...
./backend_test.go:23: multiple-value batchTx.UnsafeRange() in single-value context
2015-08-27 15:20:29 -04:00
Xiang Li
e8f40b0412
storage/backend: add commitAndStop
...
After the upgrade of boltdb, db.Close waits for all txn to finish.
CommitAndStop commits the current txn and stop creating new ones.
2015-08-25 10:57:25 -07:00
Xiang Li
53a77fa519
*: tnx -> txn
2015-07-24 23:21:09 +08:00
Xiang Li
ba9a46aa02
storage: initial snapshot and restore
...
Snapshot takes an io.Writer and writes the entire backend data to
the given writer. Snapshot writes a consistent view and does not
block other storage operations.
Restore restores the in-memory states (index and book keeping) of
the storage from the backend data.
2015-06-10 11:32:10 -07:00
Xiang Li
f47ed4a364
storage: initial compact
2015-06-05 09:22:44 -07:00
Xiang Li
fb12a4e412
storage: fix a deadlock in batch tx
2015-05-27 09:31:11 -07:00
Xiang Li
49da7b6556
storage: add boltdb as dependency
2015-05-27 09:24:49 -07:00
Xiang Li
e332e86b5d
storage: address barak's comments
2015-05-20 17:47:35 -07:00
Xiang Li
4b0d9f69c7
storage: add a simple backend and kv example
2015-05-14 20:43:32 -07:00