Marek Siarkowicz
1200b1006d
server: Cache compaction hash for HashByRev API
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-07 15:11:55 +02:00
Marek Siarkowicz
7358362c99
server: Extract hasher to separate interface
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-07 15:11:55 +02:00
Marek Siarkowicz
631107285a
server: Remove duplicated compaction revision
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-07 15:11:55 +02:00
Marek Siarkowicz
a3f609d742
server: Return revision range that hash was calcualted for
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-07 15:11:55 +02:00
Marek Siarkowicz
f1a759a2c8
server: Fix range in mock not returning same number of keys and values
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-07 15:11:55 +02:00
Marek Siarkowicz
ea684db535
server: Move reading KV index inside scheduleCompaction function
...
Makes it easier to test hash match between scheduleCompaction and
HashByRev.
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-07 15:11:55 +02:00
ahrtr
66c7aab4d3
fix the data inconsistency issue by adding a txPostLockHook into the backend
...
Previously the SetConsistentIndex() is called during the apply workflow,
but it's outside the db transaction. If a commit happens between SetConsistentIndex
and the following apply workflow, and etcd crashes for whatever reason right
after the commit, then etcd commits an incomplete transaction to db.
Eventually etcd runs into the data inconsistency issue.
In this commit, we move the SetConsistentIndex into a txPostLockHook, so
it will be executed inside the transaction lock.
2022-04-08 20:37:34 +08:00
Marek Siarkowicz
83538f342d
server: Add verification of whether lock was called within out outside of apply
2022-04-06 11:22:51 +02:00
Marek Siarkowicz
9a18742bd7
etcdserver: Fix invalid count returned on Range with Limit
2021-06-01 16:12:53 +02:00
Piotr Tabor
e6baf6d751
Represent bucket as object instead of []byte name.
...
Thanks to this change:
- all the maps bucket -> buffer are indexed by int's instead of
string. No need to do: byte[] -> string -> hash conversion on each
access.
- buckets are strongly typed in backend/mvcc API.
2021-05-25 09:22:25 +02:00
Piotr Tabor
865df75714
Save raftpb.ConfState in the backend.
...
This makes (bbolt) backend a full feature snapshot in term of WAL/raft,
i.e. carries:
- commit : (applied_index)
- confState
Benefits:
- Backend will be a sufficient point in time definition sufficient to
start replaying WAL. We have applied_index & confState in consistent
state.
- In case of emergency a backend state can be used for recovery
2021-05-13 14:29:36 +02:00
Piotr Tabor
aeb9b5fc73
Merge pull request #12855 from ptabor/20210409-backend-hooks
...
(no)StoreV2 (Part 4): Backend hooks: precommit updates consistency_index
2021-05-08 09:34:31 +02:00
Gyuho Lee
344c9f3930
Merge pull request #12896 from wilsonwang371/profiling-txn2
...
server: make applier use ReadTx() in Txn() instead of ConcurrentReadTx()
2021-05-06 01:59:14 -07:00
Piotr Tabor
a78d072b9a
Simplify KVstore dependency on cindex.
2021-05-04 18:21:24 +02:00
Wilson Wang
8d8d0377a2
server: applier uses ReadTx instead of ConcurrentTx
2021-04-28 11:06:24 -07:00
Piotr Tabor
7ae3d25f91
Membership: Add additional methods to trim/manage membership data in backend.
2021-04-27 17:17:31 +02:00
Piotr Tabor
d7d110b5a8
mvcc/backend tests: Refactor: Do not mix testing&prod code.
2021-04-21 09:43:13 +02:00
Piotr Tabor
3bb7acc8cf
Migrate dependencies pkg/foo -> client/pkg/foo
2021-04-07 00:38:47 +02:00
Piotr Tabor
03f55eeb2c
Make NewTmpBackend use testing tmp location (so cleanup).
2021-03-26 13:54:55 +01:00
jingyih
0558e379c3
server: proper request cancellation for range
2020-11-05 21:30:02 -08:00
Piotr Tabor
aaf423e962
server: Update imports.
...
find -name '*.go' | xargs sed -i --follow-symlinks 's|etcd/v3/|etcd/server/v3/|g'
2020-10-26 13:02:32 +01:00
Piotr Tabor
4a5e9d1261
server: Move server files to 'server' directory.
...
26 git mv mvcc wal auth etcdserver etcdmain proxy embed/ lease/ server
36 git mv go.mod go.sum server
2020-10-26 12:57:19 +01:00