2a0ecd4078
upgrade cockroachdb/datadriven to v1.0.2 to remove archived dependencies
...
Signed-off-by: Paco Xu <paco.xu@daocloud.io >
2023-01-31 14:42:15 +08:00
747de58414
bump bbolt to v1.3.7 for release-3.5
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-01-31 07:12:46 +08:00
215b53cf3b
version: bump up to 3.5.7
2023-01-20 11:15:12 +01:00
53300ece3b
etcdserver: return membership.ErrIDNotFound when the memberID not found
...
Backport https://github.com/etcd-io/etcd/pull/15095 .
When promoting a learner, we need to wait until the leader's applied ID
catches up to the commitId. Afterwards, check whether the learner ID
exist or not, and return `membership.ErrIDNotFound` directly in the API
if the member ID not found, to avoid the request being unnecessarily
delivered to raft.
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-01-17 06:24:27 +08:00
e1fc545d8a
etcdserver: process the scenaro of the last WAL record being partially synced to disk
...
We need to return io.ErrUnexpectedEOF in the error chain, so that
etcdserver can repair it automatically.
Backport https://github.com/etcd-io/etcd/pull/15068
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2023-01-08 05:30:01 +08:00
a612b9285f
format the source code and tidy the dependencies using go 1.17.13
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-19 13:26:59 +08:00
69ee8a83ab
bump go version to 1.17.13
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-19 13:23:16 +08:00
3337f35f17
deps: bump golang.org/x/net to v0.4.0 to address CVEs
...
CVE-2021-44716
CVE-2022-27664
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-19 09:28:07 +08:00
c1a89973f0
etcdserver: fix nil pointer panic for readonly txn
...
Backporting https://github.com/etcd-io/etcd/pull/14895
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-12-06 18:16:49 +08:00
378ad6b517
[3.5] Backport: non mutating requests pass through quotaKVServer when NOSPACE
...
Signed-off-by: Vaibhav Mehta <mehvaibh@amazon.com >
2022-12-05 21:04:09 +00:00
ba122c9d56
etcdserver: intentionally set the memberID as 0 in corruption alarm
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-11-25 16:23:37 +08:00
cecbe35ce0
version: bump up to 3.5.6
2022-11-21 15:54:14 +01:00
c91978077b
client/pkg/fileutil: add missing logger to {Create,Touch}DirAll
...
Also populate it to every invocation.
Signed-off-by: WangXiaoxiao <1141195807@qq.com >
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-11-17 14:08:30 +01:00
563713e128
etcdserver: call the OnPreCommitUnsafe in unsafeCommit
...
`unsafeCommit` is called by both `(*batchTxBuffered) commit` and
`(*backend) defrag`. When users perform the defragmentation
operation, etcd doesn't update the consistent index. If etcd
crashes(e.g. panicking) in the process for whatever reason, then
etcd replays the WAL entries starting from the latest snapshot,
accordingly it may re-apply entries which might have already been
applied, eventually the revision isn't consistent with other members.
Refer to discussion in https://github.com/etcd-io/etcd/pull/14685
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-11-11 17:35:26 +08:00
be4adc0c55
server: add more context to panic message
...
Signed-off-by: Cenk Alti <cenkalti@gmail.com >
2022-11-01 19:02:32 -04:00
1e96e0be38
etcdserver: call refreshRangePermCache on Recover() in AuthStore. #14574
...
Signed-off-by: Oleg Guba <oleg@dropbox.com >
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com >
2022-10-29 13:56:08 +09:00
efb9480b96
server: add a unit test case for authStore.Reocver() with empty rangePermCache
...
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com >
2022-10-29 13:26:31 +09:00
ec6f0a74ba
Merge pull request #14500 from dusk125/release-3.5
...
Release-3.5: server/etcdmain: add configurable cipher list to gRPC proxy listener
2022-10-16 06:35:17 +08:00
f6c4c84da3
etcdserver: added more debug log for the purgeFile goroutine
...
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-10-12 19:28:32 +08:00
dd983c662b
*: avoid closing a watch with ID 0 incorrectly
...
Signed-off-by: Kafuu Chino <KafuuChinoQ@gmail.com >
add test
1
1
1
1
1
1
2022-10-08 20:06:19 +08:00
7b568f23ab
*: handle auth invalid token and old revision errors in watch
...
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com >
2022-10-03 23:00:13 +09:00
db55011d7c
server/etcdmain: add configurable cipher list to gRPC proxy listener
...
Signed-off-by: Allen Ray <alray@redhat.com >
2022-09-29 11:41:57 -04:00
653d6e18c3
Replace github.com/form3tech-oss/jwt-go with https://github.com/golang-jwt/jwt/v4
...
Signed-off-by: haimantika mitra <haimantikamitra@gmail.com >
Signed-off-by: Davanum Srinivas <davanum@gmail.com >
2022-09-19 15:35:08 -04:00
19002cfc68
version: bump up to 3.5.5
2022-09-15 14:02:30 +02:00
6c26693ebe
Merge pull request #14178 from lavacat/release-3.5-txn-panic
...
[3.5] server: don't panic in readonly serializable txn
2022-09-13 14:44:38 +08:00
eef5e220a6
testing: fix TestOpenWithMaxIndex cleanup
...
A WAL object was closed by defer, however the WAL was rewritten afterwards,
so defer closed already closed WAL but not the new one. It caused a data
race between writing file and cleaning up a temporary test directory,
which led to a non-deterministic bug.
Fixes #14332
Signed-off-by: Vladimir Sokolov <vsvastey@gmail.com >
2022-09-08 11:26:10 +03:00
7639d93f15
server,test: refresh cache on each NewAuthStore
...
- permissions were incorrectly loaded on restarts.
- #14355
- Backport of https://github.com/etcd-io/etcd/pull/14358
Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com >
2022-09-07 10:22:05 -07:00
2ddb9e0883
tests: Fix member id in CORRUPT alarm
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:56 +02:00
5660bf0e7f
server: Make corrtuption check optional and period configurable
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:56 +02:00
21fb173f76
server: Implement compaction hash checking
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:56 +02:00
4a75e3d52d
server: Refactor compaction checker
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
8d4ca10ece
tests: Move CorruptBBolt to testutil
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
037a898ba0
tests: Unify TestCompactionHash and extend it to also Delete keys and Defrag
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
00bc8da0ef
tests: Add tests for HashByRev HTTP API
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
1200b1006d
server: Cache compaction hash for HashByRev API
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
7358362c99
server: Extract hasher to separate interface
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
631107285a
server: Remove duplicated compaction revision
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
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
1ff59923d6
server: Store real rv range in hasher
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
991b429336
server: Move adjusting revision to hasher
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
2b8dd0de4e
server: Pass revision as int
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
21e5d5d2b6
server: Calculate hash during compaction
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
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
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
22d3e4ebd7
server: Return error from scheduleCompaction
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
679e327d5e
server: Refactor hasher
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
f5ed371885
server: Extract kvHash struct
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
3f26995f99
server: Move unsafeHashByRev to new hash.go file
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
bc592c7b01
server: Extract unsafeHashByRev function
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00
336fef4ce2
server: Test HashByRev values to make sure they don't change
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com >
2022-09-07 15:11:55 +02:00