JmPotato
471a804665
Remove the unnecessary code
...
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2021-10-08 14:59:41 +08:00
JmPotato
0504ecdc70
Refine some code and fix a typo
...
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2021-10-08 12:07:02 +08:00
Marek Siarkowicz
90932324b1
client: Add grpc authority header integration tests
2021-09-29 12:42:16 +02:00
Piotr Tabor
752a206da4
Merge pull request #13238 from sakateka/etcdserver-logs
...
etcdserver: remove code duplication from the peer.send func
2021-09-27 09:01:34 +02:00
Marek Siarkowicz
66d05e5496
Try updating storage version immidietly after cluster version is set
2021-09-10 10:16:48 +02:00
Hitoshi Mitake
2a750a8dba
*: implement a retry logic for auth old revision in the client
2021-09-05 01:13:52 +09:00
Marek Siarkowicz
83a325ac46
server: Move all functions needed for storage bootstrap to storage package
...
This is prerequestite to move storage bootstrap, splitted to separate PR
to make it easier to review.
2021-08-03 13:09:15 +02:00
Marek Siarkowicz
23b742cfd3
server: Remove Quota direct dependency on EtcdServer
2021-08-03 12:48:41 +02:00
Marek Siarkowicz
44b8ae145b
etcdserver: Move datadir and wal to storage package
2021-08-03 12:47:37 +02:00
Sahdev Zala
2526463e44
Merge pull request #13236 from roytman/expensiveRequest
...
etcdserver: configure "expensive" requests duration
2021-08-02 09:33:43 -04:00
Alexey Roytman
2a26f7ae4c
etcdserver: configure "expensive" requests duration
...
When a unary request takes more than predefined duration, this request
is defined as "expensive" and a warning is printed. The expensive request
duration is hard-coded to 300 ms. It can be not enough for example
for transactions with a lot of operations. The warnings just blow up
the log files and reduce throughput.
This fix allows user to configure the "expensive" request duration.
Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
2021-07-27 08:33:44 +03:00
Sergey Kacheev
daf7e0350a
etcdserver: remove code duplication from the peer.send func
...
During the refactoring process, duplicate logging
of the send buffer overflow event was added.
Each of these log lines logs exactly the same information, the logging
context is sufficient to distinguish the cause.
Additionally, the unnecessary context (in parentheses) in the log
message was removed, which was necessary without the zap context (with
the old logger), but now only confuses.
2021-07-22 23:15:20 +07:00
Marek Siarkowicz
2f31cc3fbc
etcdserver: Create AlarmBackend interface
2021-07-20 17:53:44 +02:00
Marek Siarkowicz
5b6f4579fb
server: Rename buckets to schema
2021-07-12 15:37:21 +02:00
Marek Siarkowicz
5e40a8b00c
server: Create storage package and move mvcc files to it
2021-07-12 15:37:21 +02:00
ahrtr
d38c383c0d
etcdserver: skip empty alarm from the query parameter
2021-07-05 23:54:49 +08:00
Marek Siarkowicz
bf3e7033e9
etcdserver: Move Read/Update methods on Meta bucket to one place
...
There are still some left like compact keys, but they will require more
work to avoid circular dependency.
2021-07-05 13:23:53 +02:00
Piotr Tabor
1208505290
Merge pull request #13161 from serathius/membership
...
etcdserver: Membership uses MembershipStorage interface instead of directly accessing Backend
2021-07-03 11:33:38 +02:00
Marek Siarkowicz
e5a026822b
etcdserver: Move put/read/delete on Alarm bucket to bucket package
2021-07-01 13:35:10 +02:00
Marek Siarkowicz
50507d5f3c
etcdserver: Membership uses MembershipStorage interface instead of directly accessing Backend
2021-06-29 16:14:06 +02:00
Marek Siarkowicz
f79d09d48b
etcdserver: Move all named keys to buckets module
2021-06-28 16:40:50 +02:00
Gyuho Lee
2a0f8f0738
Merge pull request #13145 from tangcong/fix-endpoint-health
...
fix health endpoint not usable when authentication is enabled
2021-06-25 18:33:46 -07:00
Marek Siarkowicz
e2740b4afa
server,etcdutl: Preserve etcd version in backend allowing etcdutl to read it from snapshot
2021-06-25 14:06:56 +02:00
tangcong
dd62aebfb5
fix health endpoint not usable when authentication is enabled
2021-06-25 14:02:45 +08:00
Lili Cosic
b9d837183a
server/etcdserver/api: Add 3.6 to supported version
2021-06-22 12:25:39 +02:00
Marek Siarkowicz
e1b1d93548
*: Snapshot returns local etcd version
...
Co-authored-by: Lili Cosic <cosiclili@gmail.com>
2021-06-14 16:36:50 +02:00
J. David Lowe
115c694af6
etcdserver: don't attempt to grant nil permission to a role
...
Prevent etcd from crashing when given a bad grant payload, e.g.:
$ curl -d '{"name": "foo"}' http://localhost:2379/v3/auth/role/add
{"header":{"cluster_id":"14841639068965178418", ...
$ curl -d '{"name": "foo"}' http://localhost:2379/v3/auth/role/grant
curl: (52) Empty reply from server
2021-06-04 14:20:02 -07:00
Piotr Tabor
f15e0b8237
integration.BeforeTest can be run without leak-detection.
2021-05-27 20:55:11 +02:00
Pavan BG
d9c5e1f0a2
*: Replace internal testutil AssertEqual function in favour of github.com/stretchr/testify/assert.Equals
...
To maintain uniformity in testing methodology, assert.Equals has been used everywhere while replacing testutil.AssertEqual
Fixes #13015
2021-05-20 19:55:45 +05:30
Piotr Tabor
66752fef2f
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-18 18:58:53 +02:00
Piotr Tabor
e44fb40be5
Merge pull request #12962 from ptabor/20210513-write-conf-state
...
Save raftpb.ConfState in the backend.
2021-05-13 19:22:28 +02:00
Gyuho Lee
e2d67f2e3b
Merge pull request #12956 from gyuho/rename-to-main
...
*: rename "master" branch references to "main" in source code
2021-05-13 08:26:33 -07: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
3cb1ba4b2b
Merge pull request #12954 from serathius/logger-new-ctx-client
...
client: Add logger argument to NewCtxClient
2021-05-13 09:03:38 +02:00
Gyuho Lee
77c8033739
server: rename "master" branch references
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-12 10:37:35 -07:00
Piotr Tabor
f3b4a3e578
Detecting whether v2store is "empty" (metadata only).
2021-05-12 18:09:34 +02:00
Marek Siarkowicz
1189ee3f3d
client: Add logger argument to NewCtxClient
2021-05-12 16:40:55 +02:00
Lili Cosic
1a718a958e
Add initial Tracing with OpenTelemetry
2021-05-10 10:44:40 +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
tangcong
b32bc914ff
learner support snapshot RPC ( #12890 )
...
* learner support snapshot RPC
* CHANGELOG: update for 12890
2021-05-04 13:26:33 -07:00
Piotr Tabor
2dbecea5b2
Simplify KVStore interaction with cindex thanks to hooks.
2021-05-04 18:21:23 +02:00
Piotr Tabor
a3fc535a5a
Merge pull request #12914 from ptabor/20210430-read-membership
...
No-storeV2: Read membership information from the backend (Part5)
2021-05-04 10:15:01 +02:00
Piotr Tabor
ffea1537d4
ClientV3 tests use integration.NewClient that configures proper logger.
2021-04-29 18:18:34 +02:00
Piotr Tabor
205a1a442a
Read membership information from the backend.
2021-04-29 13:45:45 +02:00
Piotr Tabor
067521981e
v2 etcdctl backup: producing consistent state of membership
2021-04-27 19:34:34 +02:00
Piotr Tabor
a70386a1a4
Simplify membership interface: Does not pass the 'unused' token.
2021-04-27 17:17:31 +02: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
768da490ed
sever: v2store deprecation: Fix etcdctl snapshot restore
to restore
...
correct 'backend' (bbolt) context in aspect of membership.
Prior to this change the 'restored' backend used to still contain:
- old memberid (mvcc deletion used, why the membership is in bolt
bucket, but not mvcc part):
```
mvs := mvcc.NewStore(s.lg, be, lessor, ci, mvcc.StoreConfig{CompactionBatchLimit: math.MaxInt32})
defer mvs.Close()
txn := mvs.Write(traceutil.TODO())
btx := be.BatchTx()
del := func(k, v []byte) error {
txn.DeleteRange(k, nil)
return nil
}
// delete stored members from old cluster since using new members
btx.UnsafeForEach([]byte("members"), del)
```
- didn't get new members added.
2021-04-27 17:17:30 +02:00
Piotr Tabor
9a4b2bdccc
Errors: context cancelled
or context deadline exceeded
are exposed as codes.Canceled, codes.DeadlineExceeded instead of 'codes.Unknown'
2021-04-22 14:35:24 +02:00
Piotr Tabor
ea287dd9f8
Merge pull request #12854 from ptabor/20210410-shouldApplyV3
...
(no)StoreV2 (Part 3): Applying consistency fix: ClusterVersionSet (and co) might get not applied on v2store
2021-04-21 09:31:38 +02:00