15 Commits

Author SHA1 Message Date
Gyu-Ho Lee
d55ab7798b storage: change var names from 'index'
Having the same variable name as 'index' type
can be confusing and shadowing other variables.
This gives different variable names to 'index' variables.
2015-12-12 16:37:24 -08:00
Gyu-Ho Lee
52d21331e2 storage: fixes shadowed variables
Fixes for https://github.com/coreos/etcd/issues/3954.
2015-12-12 09:20:34 -08:00
Yicheng Qin
2f74f76025 storage: remove the event concept from key-value layer
The point is to decouple the key-value storage layer and the
event notification layer clearly. It gives the watchableKV the
flexibility to define whatever event structure it wants without
breaking the ondisk format at key-value storage layer.

Changes:

1. change the format of key and value stored in backend

Store KeyValue struct instead of Event struct in backend value for
better abstraction as xiang suggests. And record the corresponded
action in the backend key.

2. Remove word 'event' from functions
2015-11-17 20:35:49 -08:00
Yicheng Qin
5709b66dfb storage: add unit test for index.RangeEvents 2015-09-19 23:08:24 -07:00
Jonathan Boulle
7848ac3979 *: add missing license headers 2015-09-15 14:09:01 -07:00
Yicheng Qin
0813139140 storage: add more tests for index 2015-08-26 12:53:30 -07:00
Yicheng Qin
62f7481b19 storage: keyIndex.get returns err when key is tombstoned
Before this commit, it will return wrong create index, mod index.

It lets findGeneration return error when rev is at the gap of two
generations. This leads to the change of compact() code.
2015-08-23 20:59:02 -07:00
Xiang Li
6b23a8131f *: test gofmt with -s and fix reported issues 2015-08-21 18:52:16 -07:00
Tyler Neely
acd7a92f03 storage: reversion -> revision 2015-08-20 08:39:07 -07:00
Xiang Li
ccca2b04da storage: save version 2015-06-29 13:15:09 -07:00
Xiang Li
c069119abe Merge pull request #3067 from xiang90/storage_created_mod
storage: save created index and modified index
2015-06-27 23:11:05 -07:00
Xiang Li
4581064060 storage: save created index and modified index 2015-06-26 12:10:26 -07:00
Yicheng Qin
b20598eea0 storage: add range and tombstone test for index 2015-06-18 18:05:37 -07:00
Xiang Li
d417b36e5d storage: refactor key_index 2015-05-31 15:24:04 -07:00
Xiang Li
ee47973199 storage: initial index 2015-05-14 17:53:41 -07:00