Tsonglew
e5a80f5049
fix: typo gouroutine
...
fix: typo gouroutine
2022-06-16 16:35:06 +08:00
Piotr Tabor
a1fe0b8ea3
Merge pull request #14116 from ptabor/20220613-embed-errors
...
Embed server should log errors (and not get stuck)
2022-06-15 22:37:40 +02: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
Piotr Tabor
1c401581e3
Close channel of started servers even if embed server fails to start.
...
Before this change:
```
gwmux, err = sctx.registerGateway([]grpc.DialOption{grpc.WithInsecure()})
if err != nil { return err; }
```
caused the Etcd.Serve() method finish without sctx.serversC channel being closed.
The code closing Etcd got stuck waiting for all the servers to be running.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-15 13:50:17 +02:00
Piotr Tabor
fcc8fce4d2
Expand logging in case of embed server not being able to successfully start.
...
So far the errors were directed to Etcd.Errc (channel) that is not being consumed in practice.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-15 13:50:17 +02:00
Marek Siarkowicz
71bba3c761
Merge pull request #14106 from SimFG/remove_case
...
wal: remove the repeated test case
2022-06-14 12:13:00 +02:00
SimFG
402188a98c
wal: remove the repeated test case
...
The TestFilePipelineFailLockFile case maybe test the line 77 in the alloc function. But the LockFile will not throw an error when the file lock is hold. And TestFilePipelineFailPreallocate and TestFilePipelineFailLockFile are exactly the same except for the comments.
Signed-off-by: SimFG <1142838399@qq.com>
2022-06-14 17:26:20 +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
9612fc1194
tests: Unify TestCompactionHash and extend it to also Delete keys and Defrag
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20: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
76d3c527ae
server: Store real rv range in hasher
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:26 +02:00
Marek Siarkowicz
8f7b053480
server: Move adjusting revision to hasher
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:26 +02:00
Marek Siarkowicz
19941654fe
server: Pass revision as int
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:26 +02:00
Marek Siarkowicz
887e53e61a
server: Calculate hash during compaction
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:26 +02:00
Marek Siarkowicz
7381c81a7e
server: Fix range in mock not returning same number of keys and values
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:26 +02:00
Marek Siarkowicz
08a43178fa
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-06-13 18:19:26 +02:00
Marek Siarkowicz
638ca1006a
server: Return error from scheduleCompaction
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:26 +02:00
Marek Siarkowicz
0f90359c4b
server: Refactor hasher
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:25 +02:00
Marek Siarkowicz
e62c358793
server: Extract kvHash struct
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:25 +02:00
Marek Siarkowicz
fcaf76dbca
server: Move unsafeHashByRev to new hash.go file
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:25 +02:00
Marek Siarkowicz
0984878ae7
server: Extract unsafeHashByRev function
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:25 +02:00
Marek Siarkowicz
39c6935c65
server: Test HashByRev values to make sure they don't change
...
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:25 +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
31cd4e7c2d
Merge pull request #14084 from SimFG/mvcc-range-since
...
mvcc: improve the use of locks in index.go
2022-06-09 15:39:18 +02:00
SimFG
b295cebc05
mvcc: improve the use of locks in index.go
...
To make the meaning of the RangeSince function in treeIndex clearer.
2022-06-09 20:35:02 +08:00
Marek Siarkowicz
72a84ddbcf
server: Fix broken code during merge
2022-06-09 13:34:33 +02:00
Benjamin Wang
5a7df03592
Merge pull request #14080 from ahrtr/lease_revoke_lock
...
Fix potential deadlock between Revoke and (Grant or Checkpoint)
2022-06-09 16:52:36 +08: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
Dirc
ba405f64c1
Update link to tuning page
2022-06-08 10:16:04 +02:00
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