Commit Graph

19 Commits (e39ad84440cd03005f6c035e001dc14d8b113a64)

Author SHA1 Message Date
Yicheng Qin 87b5143b15 storage: fix missing continue in keyIndex.since
It should continue to skip following operations.

The test from rev14 to rev0 fails if it doesn't call continue and append
all revisions of the same main rev to the list.
2015-09-19 23:01:18 -07:00
Yicheng Qin 158d6e0e03 storage: fix calculating generation in keyIndex.since
It should skip last empty generation when the key is just tombstoned.

The rev15 and rev16 in the test fails if it doesn't skip last empty generation
and find previous generations.
2015-09-19 22:58:45 -07:00
Jonathan Boulle 7848ac3979 *: add missing license headers 2015-09-15 14:09:01 -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 dd443be41b storage: report total number of keys 2015-08-28 15:16:53 -07:00
Yicheng Qin ad8a291dc1 storage: return error when tombstone on new generation
It is not allowed to put tombstone on an empty generation.
2015-08-26 12:53:30 -07:00
Yicheng Qin ffa87f9678 storage: fix the comment in generation.walk 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
Cong Ding c09b667d57 *: fix go vet reported issues 2015-08-22 12:19:02 -05:00
Tyler Neely acd7a92f03 storage: reversion -> revision 2015-08-20 08:39:07 -07:00
Xiang Li 433f2ee1bc storage: correctly restore create and ver
Add a restore func to correctly restore create reversion and
version of keys for the index.
2015-06-29 13:44:43 -07:00
Xiang Li ccca2b04da storage: save version 2015-06-29 13:15:09 -07:00
Xiang Li 4581064060 storage: save created index and modified index 2015-06-26 12:10:26 -07: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 e332e86b5d storage: address barak's comments 2015-05-20 17:47:35 -07:00
Xiang Li 9d831e3075 *: godep btree 2015-05-14 17:59:55 -07:00
Xiang Li 32d44aa3b2 storage: initial key index 2015-05-14 17:35:12 -07:00