37 Commits

Author SHA1 Message Date
Gyu-Ho Lee
f6215574f2 *: kv range to return current revision
This changes the behavior of KV's range and tx range to return
current revision rather than range revision. This makes populating
range response header easier.
2016-01-30 17:37:34 -08:00
Xiang Li
128b5e7387 etcdserver: check invalid range in txn 2016-01-25 20:21:17 -08:00
Gyu-Ho Lee
f76166a041 *: fix minor typos 2016-01-08 00:21:19 -08:00
Xiang Li
43a777b7a2 *: get snapshot from backend
We should get snapshot from backend, not just KV.
We plan to store the lease data into backend too.
2016-01-06 22:40:23 -08:00
Xiang Li
1714290f4e storage: support recovering from backend
We want the KV to support recovering from backend to avoid
additional pointer swap. Or we have to do coordination between
etcdserver and API layer, since API layer might have access to
kv pointer and use a closed kv.
2016-01-06 21:16:55 -08:00
Xiang Li
1e61243fd7 Merge pull request #4134 from xiang90/lease
lease: modify API and persist lease to disk
2016-01-05 10:30:52 -08:00
Xiang Li
09b420f08c *: move leaseID typedef to lease pkg 2016-01-05 10:18:17 -08:00
Gyu-Ho Lee
556d4a6932 *: remove CancelFunc return for Watch. Use Cancel for watch. 2016-01-04 16:17:55 -08:00
Xiang Li
4336278b44 *: support put with lease 2016-01-04 15:54:06 -08:00
Xiang Li
ee0b3f42ed *: rename watcher to watchStream
Watcher vs Watching in storage pkg is confusing. Watcher should be named
as watchStream since it contains a channel as stream to send out events.
Then we can rename watching to watcher, which actually watches on a key
and send watched events through watchStream.

This commits renames watcher to watchStram.
2016-01-02 16:03:57 -08:00
Xiang Li
10de2e6dbe *: serve watch service
Implement watch service and hook it up
with grpc server in etcdmain.
2015-11-03 15:58:34 -08:00
Xiang Li
a1129dd5a5 storage: support multiple watching per watcher
We want to support multiple watchings per one watcher chan. Then
we can have one single go routine to watch multiple keys/prefixs.
2015-11-03 12:36:11 -08:00
Xiang Li
f71bcfa8ce storage: move watcher interface into watcher.go 2015-10-28 21:10:58 -07:00
Yicheng Qin
4b8ee2d66e storage: skip old entry in ConsistentWatchableStore
This avoids to apply the same entry twice when restoring from disk.
2015-10-26 23:26:06 -07:00
Yicheng Qin
263b270708 etcdserver: commit v3 storage before releasing WAL
This ensures that v3 storage could always find the following log entries
when restart.
2015-10-26 21:06:08 -07:00
Yicheng Qin
4fb4bc3ca8 storage: add consistentWatchableStore
consistentWatchableStore maintains an index that is always consistent
with the latest txn. The index could be used to indicate the progress
of the store so far when recovery.
2015-10-22 22:54:51 -07:00
Yicheng Qin
027c073d55 storage: refine Watch comment in WatchableKV
Explain explicitly how these arguments are used.
2015-10-21 14:47:52 -07:00
Yicheng Qin
2673e657e6 storage: fix WatchableKV interface
We delete endRev from the watch functionality, so the interface needs
to be fixed.
2015-10-21 11:50:25 -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
Jonathan Boulle
7848ac3979 *: add missing license headers 2015-09-15 14:09:01 -07:00
Xiang Li
6d1f0ce89f storage: add rev into kv interface 2015-09-15 12:11:00 -07:00
Yicheng Qin
c082488e23 Merge pull request #3507 from yichengq/watch
storage: support basic watch
2015-09-15 00:04:36 -07:00
Yicheng Qin
ec43e0a4c3 storage: introduce WatchableKV and watch feature
WatchableKV is an interface upon KV, and supports watch feature.
2015-09-14 23:53:03 -07:00
Xiang Li
714b5e0b08 storage: support hash state 2015-09-13 21:34:58 -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
d417b36e5d storage: refactor key_index 2015-05-31 15:24:04 -07:00
Xiang Li
6c207b9277 stroage: kill todo 2015-05-27 14:46:59 -07:00
Xiang Li
69d02410cf stroage: adopt KV interface 2015-05-27 14:24:23 -07:00
Xiang Li
93ecf36855 storage: support tnx 2015-05-27 09:31:11 -07:00
Xiang Li
9db360387d storage: support Range 2015-05-27 09:31:11 -07:00
Xiang Li
7bb388ed52 storage: initial kv api 2015-05-27 09:31:11 -07:00
Xiang Li
e332e86b5d storage: address barak's comments 2015-05-20 17:47:35 -07:00
Xiang Li
845cb61213 storage: add kv and event proto 2015-05-18 14:35:10 -07:00
Xiang Li
9575cc4258 storage: add delete example 2015-05-15 19:33:59 -07:00
Xiang Li
4b0d9f69c7 storage: add a simple backend and kv example 2015-05-14 20:43:32 -07:00