ahrtr
dabf6978cc
Fix potential deadlock between Revoke and (Grant or Checkpoint)
2022-06-07 18:45:43 +08:00
ahrtr
1d482bfc08
Move the local variable cps into the loop so that it will not continue to schedule checkpoints after it steps down the leader
2022-05-29 05:08:41 +08:00
Benjamin Wang
ce77d83ee6
Merge pull request #14067 from ahrtr/lease_revoke
...
Fix the race condition between goroutine and channel on the same leases to be revoked
2022-05-29 05:04:26 +08:00
ahrtr
6e9397d171
move lease related code into a separate file lease.go
2022-05-27 20:22:29 +08:00
ahrtr
25deb436af
fix the race condition between goroutine and channel on the same leases to be revoked
2022-05-25 16:44:41 +08:00
Piotr Tabor
41ff2370e9
Remove unused code and apply code-quality suggestions.
2022-05-20 14:42:39 +02:00
Piotr Tabor
85b18c9b3e
Rename WrapApply to Apply.
2022-05-20 14:32:04 +02:00
Piotr Tabor
87b80f16ca
Fixing missing comment on the dispatch() function.
2022-05-20 14:32:04 +02:00
Piotr Tabor
42c6e08f22
Rename the txn, so as not to be the same as the package name.
2022-05-20 14:32:04 +02:00
Piotr Tabor
0da0cf4795
expose UberApplier as interface (not as implementation struct).
2022-05-20 14:32:04 +02:00
Piotr Tabor
5097b33ab9
Rename etcdserver/etcderrors package to etcdserver/errors.
2022-05-20 14:32:04 +02:00
Piotr Tabor
63b2f63cc1
Rename package alising "apply2" -> apply.
2022-05-20 14:32:04 +02:00
Piotr Tabor
c62f01e5fe
Move CheckTxnAuth to txn.
2022-05-20 14:32:04 +02:00
Piotr Tabor
c78bf655a7
Simplify imports and improve comments.
2022-05-20 14:32:04 +02:00
Piotr Tabor
4e04770bac
Apply encapsulation: Cleanup metrics reporting.
...
Side effect: applySec(0.4s) used to be reported as 0s, now it's correctly 0.4s.
2022-05-20 14:32:04 +02:00
Piotr Tabor
47a771871b
Move apply to its own package (no dependency on etcdserver).
2022-05-20 14:32:04 +02:00
Piotr Tabor
fc6a6c3c27
Move etcdserver/errors.go to sepatate package to avoid cyclic dependencies.
2022-05-20 14:32:04 +02:00
Piotr Tabor
e2ae9b1d13
Move server/etcdserver/txn.go to new package: server/etcdserver/txn
2022-05-20 14:32:04 +02:00
Piotr Tabor
b073129d03
Applier does not depend on EtcdServer any longer.
...
All the depencies are explicily passed to the UberApplier factory method.
2022-05-20 14:32:04 +02:00
Piotr Tabor
651de5a057
Rename EtcdServer.Id with EtcdServer.MemberId.
...
It was misleading and error prone vs. ClusterId.
2022-05-20 14:32:04 +02:00
Piotr Tabor
f348134edd
Marge applierV3Internal into applierV3 interface
2022-05-20 14:32:04 +02:00
Piotr Tabor
b7ad746bfe
Encapsulating applier logic: UberApplier coordinates all appliers for server
...
This PR:
- moves wrapping of appliers (due to Alarms) out of server.go into uber_applier.go
- clearly devides the application logic into: chain of:
a) 'WrapApply' (generic logic across all the methods)
b) dispatcher (translation of Apply into specific method like 'Put')
c) chain of 'wrappers' of the specific methods (like Put).
- when we do recovery (restore from snapshot) we create new instance of appliers.
The purpose is to make sure we control all the depencies of the apply process, i.e.
we can supply e.g. special instance of 'backend' to the application logic.
2022-05-20 14:32:04 +02:00
Piotr Tabor
cdf9869d70
Encapsulation of applier logic: Move Txn related code out of applier.go.
...
The PR removes calls to applierV3base logic from server.go that is NOT part of 'application'.
The original idea was that read-only transaction and Range call shared logic with Apply,
so they can call appliers directly (but bypassing all 'corrupt', 'quota' and 'auth' wrappers).
This PR moves all the logic to a separate file (that later can become package on its own).
2022-05-20 14:32:04 +02:00
ahrtr
b32ac1f67b
fix a typo: print the correct error info
2022-05-19 07:19:44 +08:00
ahrtr
1e6163ba27
remove v2 http proxy in 3.6
2022-05-13 17:44:58 +08:00
Christian Provenzano
c1e58ee91f
server: Don't register director interrupt handler
2022-05-11 21:21:06 -04:00
Christian Provenzano
b5b466088d
server: Move director interrupt handler to method
2022-05-11 20:41:10 -04:00
Christian Provenzano
655d171eca
server: Add director interrupt handler
...
Director's goroutine would not be properly stopped in a non-test
scenario. Handler stops it when process is interrupted.
2022-05-11 18:19:22 -04:00
Christian Provenzano
70a7674e20
server: Director can be stopped
...
Goroutine for new directors would live past director scope. Tests
could occassionally fail if this goroutine had log events after
test execution should have ended.
2022-05-10 23:36:14 -04:00
ahrtr
e7f8bf7c44
enhance the /version endpoint to add storageVersion
2022-05-06 20:29:42 +08:00
Marek Siarkowicz
d58f971895
tests: Use zaptest.NewLogger in places we missed
2022-05-06 12:23:20 +02:00
Marek Siarkowicz
f09da32f9d
Merge pull request #13655 from serathius/health
...
Cleanup healthcheck code after V2 removal
2022-05-06 12:08:36 +02:00
Marek Siarkowicz
26f42e7a9e
server: Apply review comments and split basic handler
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
fb361e43f0
server: Split code for debug and version endpoints
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
722ec487df
server: Split metrics and health code
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
600ee13ac0
server: Cover V3 health with tests
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
e9dec74ded
server: Refactor health checks
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
191aed645e
server: Run health check tests in subtests
2022-05-05 09:52:14 +02:00
Marek Siarkowicz
e4e391792a
server: Rename test case expect fields
2022-05-05 09:52:13 +02:00
Marek Siarkowicz
0fb194d6f2
server: Use named struct initialization in healthcheck test
2022-05-05 09:52:13 +02:00
Marek Siarkowicz
0096d2ecdb
server: Remove unused NewClientHandler
2022-05-05 09:52:13 +02:00
ahrtr
fb2eeb9027
verify consistent_index in snapshot must be equal to the snapshot index
...
Usually the consistent_index should be greater than the index of the
latest snapshot with suffix .snap. But for the snapshot coming from the
leader, the consistent_index should be equal to the snapshot index.
2022-05-03 20:02:47 +08:00
Colleen Murphy
27bd78f6ab
Update golang.org/x/crypto to latest
...
Update crypto to address CVE-2022-27191.
The CVE fix is added in 0.0.0-20220315160706-3147a52a75dd but this
change updates to latest.
2022-04-25 09:52:12 -07:00
Piotr Tabor
887f95d0d3
Merge pull request #13963 from ptabor/20220412-verify-assert
...
Add verification consistent index is (nearly) never decreasing
2022-04-25 10:13:44 +02:00
Tony Abboud
1d13e0733c
Fix logger spelling in NewZapLoggerBuilder godoc
...
Just a small docs fix that I happened to notice when setting up a new zap logger for etcd
2022-04-22 12:08:54 -04:00
Piotr Tabor
d69e07dd3a
Verification framework and check whether cindex is not decreasing.
2022-04-22 12:32:05 +02:00
ahrtr
6eef7ede40
Update conssitent_index when applying fails
...
When clients have no permission to perform whatever operation, then
the applying may fail. We should also move consistent_index forward
in this case, otherwise the consitent_index may smaller than the
snapshot index.
2022-04-20 21:44:48 +08:00
Piotr Tabor
55a7c91de9
test.sh: Tools run correctly on OsX
...
- The location of installed tools is found using `go list`
- ETCD_VERIFY env variable is printed in repro command line.
2022-04-17 23:28:26 +02:00
ahrtr
0dae4b3b1e
rollback the opentelemetry bumpping to recover the pipeline failures
2022-04-14 16:13:28 +08:00
Will Beason
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