Commit Graph

17898 Commits

Author SHA1 Message Date
fe35b5130e Fix code scanning alert: This log write receives unsanitized user input 2022-04-19 13:49:08 +02:00
93c54b816d Merge pull request #13957 from ahrtr/fix_TestKVPut
Use lineariziable range request in TestKVGet
2022-04-18 10:00:14 +02:00
842fed52c7 use lineariziable range request in TestKVGet 2022-04-18 08:56:19 +08:00
81491914fb Merge pull request #13945 from ahrtr/rollback_opentelemetry_bump
Rollback the opentelemetry bumpping to recover the pipeline failures
2022-04-16 21:33:00 +02:00
0dae4b3b1e rollback the opentelemetry bumpping to recover the pipeline failures 2022-04-14 16:13:28 +08:00
ff1569f134 Merge pull request #13941 from serathius/recommendation-v3.5.3
Update production recommendation for v3.5.3
2022-04-13 21:57:20 +02:00
f409f39bb8 Update production recommendation for v3.5.3 2022-04-13 21:55:56 +02:00
2e034d2b65 Merge pull request #13888 from willbeason/upgrade-opentelemetry
go.mod: upgrade opentelemetry deps
2022-04-13 18:42:47 +02:00
d888118171 Merge pull request #13929 from wyrobnik/raftexample-snap-pre-hard-state
contrib/raftexample: Save snapshot and WAL before hard state
2022-04-13 18:30:34 +02:00
eab1e0c5d5 go.mod: upgrade opentelemetry deps
Downstream users of etcd experience build issues when using dependencies
which require more recent (incompatible) versions of opentelemetry. This
commit upgrades the dependencies so that downstream users stop
experiencing these issues.
2022-04-13 07:14:10 -07:00
f341b9526a Merge pull request #13923 from endocrimes/dani/syncer
cv3/mirror: Fetch the most recent revision from the prefix
2022-04-13 11:51:33 +02:00
3a239f7b3b Merge pull request #13935 from mrueg/update-changelog-3.5.3
CHANGELOG-3.5: Add #13862
2022-04-12 22:24:36 +02:00
d7e498a5c6 CHANGELOG-3.5: Add #13862
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-04-12 16:53:09 +02:00
6cb7372e6d clientv3: disable mirror auth test with proxy 2022-04-12 13:42:13 +00:00
d927f7c7da Merge pull request #13710 from serathius/windows
scripts: Remove Windows build scripts
2022-04-12 11:50:07 +02:00
fd0d637429 Merge pull request #13934 from ahrtr/changelog_snapshot_cindex_and_lease
Update 3.6 and 3.5 change log to cover two issues
2022-04-12 11:49:03 +02:00
98764fadef scripts: Remove Windows build scripts 2022-04-12 10:34:10 +02:00
dfd1d49c97 update 3.6 and 3.5 change log to cover two issues
The first issue is to support linearizable lease renewal request.
The second issue is to prevent the consistent_index coming from
a snapshot is overwritten by the local old value.
2022-04-12 16:31:26 +08:00
b018742c4b Merge pull request #13930 from ahrtr/fix_snapshot_recover_cindex
Set backend to cindex before recovering the lessor in applySnapshot
2022-04-12 09:52:51 +02:00
484d2f01f3 set backend to cindex before recovering the lessor in applySnapshot 2022-04-12 10:36:29 +08:00
3152dc8174 contrib/raftexample: Save snapshot and WAL before hard state
Update raftexample to save the snapshot file and WAL snapshot entry
before hardstate to ensure the snapshot exists during recovery.
Otherwise if there is a failure after storing the hard state there may
be reference to a non-existent snapshot.
This PR introduces the fix from #10219 to the raftexample.
2022-04-11 23:44:54 +00:00
e324cc1cbe cv3/mirror: Fetch the most recent prefix revision
When a user sets up a Mirror with a restricted user that doesn't have
access to the `foo` path, we will fail to get the most recent revision
due to permissions issues.

With this change, when a prefix is provided we will get the initial
revision from the prefix rather than /foo. This allows restricted users
to setup sync.
2022-04-11 13:42:03 +00:00
dd08e15d7c Merge pull request #13690 from ahrtr/lease_renew_linearizable
Leases wait for entries to be applied
2022-04-11 14:53:18 +02:00
1b3d6cb0c8 set an separate applyTimeout for the waitAppliedIndex 2022-04-10 14:44:55 +08:00
fe3a57976e support linearizable renew lease
When etcdserver receives a LeaseRenew request, it may be still in
progress of processing the LeaseGrantRequest on exact the same
leaseID. Accordingly it may return a TTL=0 to client due to the
leaseID not found error. So the leader should wait for the appliedID
to be available before processing client requests.
2022-04-10 14:44:55 +08:00
0c9a4e0f93 Merge pull request #13837 from chrisayoub/main
clientv3: filter learner members during autosync
2022-04-09 19:00:55 -04:00
1d8c06ac50 Merge pull request #13916 from hexfusion/email
MAINTAINERS: update Sam's contact email
2022-04-09 20:01:01 +02:00
cd8f8b9e0b MAINTAINERS: update Sam's contact email
Signed-off-by: Sam Batschelet <sbatschelet@gmail.com>
2022-04-09 13:53:21 -04:00
09b299e906 Merge pull request #13914 from ahrtr/data_corruption_changelog
Update 3.5 and 3.6 changelog to cover the data inconsistency issue
2022-04-09 13:07:06 +02:00
12bdd1c5e4 Merge pull request #13910 from serathius/crypto
*: update golang.org/x/crypto
2022-04-09 09:41:49 +02:00
7d3ca1f516 Merge pull request #13906 from donalhunt/main
*: drop use of humanize.Time() in favour of zap.Duration and time.Duration
2022-04-08 23:41:50 +02:00
bd0c5a74a3 update 3.5 and 3.6 changelog to cover the data inconsistency issue 2022-04-09 05:34:24 +08:00
d659403955 Update server/etcdserver/api/v3rpc/maintenance.go
Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
2022-04-08 18:45:13 +01:00
6e1afa9677 Update client/v3/snapshot/v3_snapshot.go
Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
2022-04-08 18:44:50 +01:00
1bb59adb1e *: update golang.org/x/crypto 2022-04-08 16:27:52 +02:00
f026a37474 Merge pull request #13907 from ahrtr/kvstore_readtx
Use readTx in (*store).restore
2022-04-08 14:14:51 +02:00
05e6527d26 Merge pull request #13756 from serathius/test-snapshot
tests: Add tests for snapshot compatibility and recovery between versions
2022-04-08 14:14:19 +02:00
a3650db574 use readTx in (*store).restore 2022-04-08 15:45:05 +08:00
76543d06ce Merge pull request #13898 from mrueg/update-tools
tools/mod: Update tools
2022-04-08 09:16:58 +02:00
4c8ef011e0 *: drop use of humanize.Time() in favour of time.Duration.String()
humanize.Time() drops precision resulting in some events reporting they took
"now" time to complete. Using time.Duration.String() results in accurate
duration being reported.

Fixes #13905
2022-04-07 23:24:35 +01:00
3dce38085d Merge pull request #13903 from serathius/term
server: Save consistency index and term to backend even when they decease
2022-04-07 21:12:23 +02:00
1ea53d527e server: Save consistency index and term to backend even when they decrease
Reason to store CI and term in backend was to make db fully independent
snapshot, it was never meant to interfere with apply logic. Skip of CI
was introduced for v2->v3 migration where we wanted to prevent it from
decreasing when replaying wal in
https://github.com/etcd-io/etcd/pull/5391. By mistake it was added to
apply flow during refactor in
https://github.com/etcd-io/etcd/pull/12855#commitcomment-70713670.

Consistency index and term should only be negotiated and used by raft to make
decisions. Their values should only driven by raft state machine and
backend should only be responsible for storing them.
2022-04-07 19:00:03 +02:00
a5b9f72da6 Merge pull request #13807 from endocrimes/dani/before-test-fix
tests/framework/integration: Fail BeforeTest nesting early
2022-04-07 15:37:06 +02:00
7cc00ec981 tests/framework/integration: Fail nesting early
Currently there are a handful of tests within etcd that silently fail
because LeakDetection will skip the test before it manages to hit this
check.

Here we move the check to the beginning of the process to highlight
these cases earlier, and to avoid them accidentally presenting as leaks.
2022-04-07 13:10:15 +00:00
dedb661d92 tools/mod: Update tools
github.com/google/addlicense v0.0.0-20210428195630-6d92264d7170 -> v1.0.0
github.com/gordonklaus/ineffassign v0.0.0-20200809085317-e36bfde3bb78 -> v0.0.0-20210914165742-4cc7213b9bc8
github.com/grpc-ecosystem/grpc-gateway v1.14.6 -> v1.16.0
github.com/hexfusion/schwag v0.0.0-20170606222847-b7d0fc9aadaa -> v0.0.0-20211117114134-3ceb0191ccbf
github.com/mgechev/revive v1.0.2 -> v1.2.0
github.com/mikefarah/yq/v3 v3.0.0-20201125113350-f42728eef735 -> v4.24.2
gotest.tools v2.2.0+incompatible -> v3.1.0
gotest.tools/gotestsum v0.3.5 -> v1.7.0
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc -> v0.3.0
mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 -> v0.0.0-20220316160445-06cc5682983b

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-04-07 14:27:51 +02:00
c83b1ad9ba Merge pull request #13854 from ahrtr/data_corruption
Fix the data inconsistency issue by moving the SetConsistentIndex into the transaction lock
2022-04-07 14:20:19 +02:00
706cde86d0 Merge pull request #13897 from mrueg/bump_client-golang
go.mod: Bump prometheus/client_golang to v1.12.1
2022-04-07 09:36:36 +02:00
4033f5c2b9 move the consistentIdx and consistentTerm from Etcdserver to cindex package
Removed the fields consistentIdx and consistentTerm from struct EtcdServer,
and added applyingIndex and applyingTerm into struct consistentIndex in
package cindex. We may remove the two fields completely if we decide to
remove the OnPreCommitUnsafe, and it will depend on the performance test
result.
2022-04-07 15:16:49 +08:00
47bb48dfdc Merge pull request #13869 from wking/test-fail-exit-code-with-log-redirect-upstream
Makefile: Drop log tee calls
2022-04-07 09:12:19 +02:00
e155e50886 rename LockWithoutHook to LockOutsideApply and add LockInsideApply 2022-04-07 05:35:13 +08:00