Commit Graph

29 Commits (dc8a31eaf0659150b42c69499dfa89aafe7de31b)

Author SHA1 Message Date
Jingyi Hu 1c19f126cb mvcc/backend: rename ReadTx Lock() to RLock()
For better code readability, renaming Lock() to RLock() in ReadTx
interface.
2019-03-05 13:53:27 -08:00
WizardCXY 6e8913b004 bugfix:dead lock on store.mu when store.Compact in store.Restore happens 2019-01-21 10:46:58 +08:00
Gyuho Lee d537b328cb mvcc: update import paths "go.etcd.io/etcd"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Gyuho Lee 03ef9745a9 mvcc: add more structured logging
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-04 13:15:51 -07:00
Gyuho Lee c00c6cb685 mvcc: support structured logger
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Gyuho Lee 8a518b01c4 *: revert "internal/mvcc" change
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee 80d15948bc *: move "mvcc" to "internal/mvcc"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:14:41 -08:00
Gyuho Lee 349a377a67 *: move "lease" to "internal/lease"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-26 11:09:29 -08:00
Manjunath A Kumatagi 89221a25b8 mvcc : Fix Govet errors 2018-01-25 02:30:37 -05:00
Gyuho Lee 2e95ace82b mvcc: fetch revisions with current revision, not 0, in HashByRev
It was getting revisions with "atRev==0", which makes
"available" from "keep" method always empty since
"walk" on "keyIndex" only returns true.

"available" should be populated with all revisions to be
kept if the compaction happens with the given revision.
But, "available" was being empty when "kvindex.Keep(0)"
since it's always the case that "rev.main > atRev==0".

Fix https://github.com/coreos/etcd/issues/9022.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-18 12:17:06 -08:00
Anthony Romano f58c0cfb66 mvcc: Revisions() method for index to avoid key allocation
Save another alloc on the one key path.
2017-08-21 11:30:02 -07:00
fanmin shi df5a3d15ce mvcc: increase rev for TestHashKVWhenCompacting 2017-07-31 17:59:49 -07:00
fanmin shi 4c2c5b0084 mvcc: add tests for Keep 2017-07-31 17:59:42 -07:00
fanmin shi 8609521ce2 mvcc: add TestHashKVWhenCompacting to kvstore_test 2017-07-26 09:48:29 -07:00
Anthony Romano e9d096ae6b mvcc: don't allocate end revision while computing range
Use 'nil' since it's only reading a single key. Also preallocates
the result slice based on limit / number of revisions fetched.

Fixes #8208
2017-07-06 15:59:27 -07:00
Anthony Romano 51a568aa81 mvcc: restore into tree index with one key index
Clobbering the mvcc kvindex with new keyIndexes for each restore
chunk would cause index corruption by dropping historical information.
2017-06-19 12:04:01 -07:00
Anthony Romano 02164874d9 mvcc: test restore and deletes with small chunk sizes 2017-06-19 12:04:01 -07:00
Anthony Romano 163fd2d76b mvcc: chunk reads for restoring
Loading all keys at once would cause etcd to use twice as much
memory than it would need to serve the keys, causing RSS to spike on
boot. Instead, load the keys into the mvcc by chunk. Uses pipelining
for some concurrency.

Fixes #7822
2017-05-09 20:14:58 -07:00
Gyu-Ho Lee cd470f9ccd Revert "mvcc: test inflight Hash to trigger Size on nil db"
This reverts commit 994e8e4f40.

Since now etcdserver gracefully shuts down the gRPC server
2017-04-17 14:15:43 -07:00
Anthony Romano 33acbb694b mvcc: txns and r/w views
Clean-up of the mvcc interfaces to use txn interfaces instead of an id.

Adds support for concurrent read-only mvcc transactions.

Fixes #7083
2017-03-08 20:52:59 -08:00
sharat 43078d3ced mvcc: remove unused restore method 2016-11-18 23:04:39 +05:30
sharat f014cca644 mvcc: TestStoreRestore fix 2016-11-16 16:58:42 +05:30
Gyu-Ho Lee 994e8e4f40 mvcc: test inflight Hash to trigger Size on nil db 2016-10-21 11:02:09 -07:00
Gyu-Ho Lee 46716fe9fb mvcc: fix gofmt issues from Go tip 2016-10-20 16:32:47 -07:00
Nikita Vetoshkin 064e02f4b3 mvcc: Optimize updating key by storing lease in lessor 2016-10-12 09:37:09 +05:00
Xiang Li ef9754910e mvcc: do not hash consistent index 2016-06-28 09:36:26 -07:00
Xiang Li def21f11a9 *: support count in range query 2016-06-21 16:20:55 -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