Tsonglew
e5a80f5049
fix: typo gouroutine
...
fix: typo gouroutine
2022-06-16 16:35:06 +08:00
Piotr Tabor
e61d431792
Merge pull request #14109 from SimFG/fifo_panic
...
schedule: Provide logs when the fifo job panic happens
2022-06-15 22:24:42 +02:00
L2ncE
637afd359b
Fix a syntax error in a code comment
...
Signed-off-by: L2ncE <llance_24@foxmail.com>
2022-06-15 23:19:12 +08:00
SimFG
d83925e357
schedule: Provide logs when the fifo job panic happens
...
To make the fifo scheduler better debuggability.
Signed-off-by: SimFG <1142838399@qq.com>
2022-06-15 20:58:17 +08:00
Marek Siarkowicz
2c12954158
Merge pull request #14049 from serathius/compact-hash
...
Calculate hash during compaction
2022-06-14 11:10:19 +02:00
Marek Siarkowicz
f5eadf5452
tests: Add tests for HashByRev HTTP API
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:19 +02:00
Marek Siarkowicz
0e739da9a4
server: Cache compaction hash for HashByRev API
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:18 +02:00
Marek Siarkowicz
2b090e86a6
server: Extract hasher to separate interface
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:18 +02:00
Marek Siarkowicz
80828b593a
server: Remove duplicated compaction revision
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:18 +02:00
Marek Siarkowicz
34a02ba621
server: Return revision range that hash was calcualted for
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:17 +02:00
Marek Siarkowicz
01e85be159
server: Cover corruptionMonitor with tests
...
Get 100% coverage on InitialCheck and PeriodicCheck functions to avoid
any mistakes.
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:25 +02:00
Marek Siarkowicz
7c35dadc25
server: Extract corruption detection to dedicated struct
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:24 +02:00
Marek Siarkowicz
70fbc0b3e7
server: Extract triggerCorruptAlarm to function
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:04:24 +02:00
Benjamin Wang
5f8cd5bd39
Replace all etcd versions with the centralized definitions
...
We have already defined all the constant etcd versions in the
centralized place api/version/version.go. So we should replace all
the versions with the centralized definitions.
2022-06-13 14:08:39 +08:00
Marek Siarkowicz
72a84ddbcf
server: Fix broken code during merge
2022-06-09 13:34:33 +02:00
Sahdev Zala
d9e5460ca8
Merge pull request #13829 from qsyqian/feature/skip_compact_when_rev_not_change
...
skip compact when rev not change at period compact mode
2022-06-08 22:54:39 -04: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
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
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