7a4a3ad8db
server: add more context to panic message
...
Signed-off-by: Cenk Alti <cenkalti@gmail.com >
2022-11-01 18:59:17 -04:00
ed10ca13f4
*: avoid closing a watch with ID 0 incorrectly
...
Signed-off-by: Kafuu Chino <KafuuChinoQ@gmail.com >
add test
1
1
1
2022-10-10 19:54:58 +08:00
04e5e5516e
[3.4] clientv3/mvcc: fixed DATA RACE between mvcc.(*store).setupMetricsReporter and mvcc.(*store).restore
...
Signed-off-by: SimFG <1142838399@qq.com >
2022-07-26 21:38:23 +08:00
1abf085cfb
fix all the pipeline failues for release 3.4
...
Items resolved:
1. fix the vet error: possible misuse of reflect.SliceHeader;
2. fix the vet error: call to (*T).Fatal from a non-test goroutine;
3. bump package golang.org/x/crypto, net and sys;
4. bump boltdb from 1.3.3 to 1.3.6;
5. remove the vendor directory;
6. remove go 1.12.17 and 1.15.15, add go 1.16.15 into pipeline;
7. bump go version to 1.16 in go.mod;
8. fix the issue: compile: version go1.16.15 does not match go tool version go1.17.11,
refer to https://github.com/actions/setup-go/issues/107 ;
9. fix data race on compactMainRev and watcherGauge;
10. fix test failure for TestLeasingTxnOwnerGet in cluster_proxy mode.
Signed-off-by: Benjamin Wang <wachao@vmware.com >
2022-06-22 05:28:45 +08:00
d30a4fbf0c
mvcc/backend: restore original bolt db options after defrag
...
Problem: Defrag was implemented before custom bolt options were added.
Currently defrag doesn't restore backend options.
For example BackendFreelistType will be unset after defrag.
Solution: save bolt db options and use them in defrag.
2022-02-17 15:33:05 -08:00
85abf6e46d
storage/backend: Add a gauge to indicate if defrag is active (backport from 3.6)
2021-10-06 11:04:47 -07:00
963d3b9369
etcdserver/mvcc: update trace.Step condition
...
backport PR #12894 to release-3.4
2021-04-28 11:35:49 +08:00
7b99863e02
mvcc: chanLen 1024 is to biger,and it used more memory. 128 seems to be enough. Sometimes the consumption speed is more than the production speed.
...
See https://github.com/etcd-io/etcd/issues/11906 for more detail.
2020-06-25 19:53:13 +08:00
78f67988aa
etcdserver, et al: add --unsafe-no-fsync flag
...
This makes it possible to run an etcd node for testing and development
without placing lots of load on the file system.
Fixes #11930 .
Signed-off-by: David Crawshaw <crawshaw@tailscale.com >
2020-06-04 20:19:28 -07:00
aa75e90ac8
mvcc: fix deadlock bug
2020-05-08 09:56:23 +08:00
347c8dac3b
*: fix auth revision corruption bug
2020-04-09 09:33:36 +08:00
89b10cf967
mvcc/kvstore:when the number key-value is greater than one million, compact take too long and blocks other requests
2020-03-30 08:21:38 -07:00
94673a6ba4
mvcc/backend: check for nil boltOpenOptions
...
Check if boltOpenOptions is nil before use it.
2020-02-15 00:18:26 -08:00
6d646c442a
mvcc/backend: Delete orphaned db.tmp files before defrag
2020-02-13 12:26:54 -08:00
8c10973820
mvcc/kvstore:fixcompactbug
2019-11-27 13:07:47 -08:00
f4669c3b62
mvcc: update to "etcd_debugging_mvcc_total_put_size_in_bytes"
2019-11-26 14:03:07 -08:00
55c3476abc
mvcc: add "etcd_mvcc_put_size_in_bytes" to monitor the throughput of put request.
2019-11-26 14:03:07 -08:00
480d5510f9
etcdserver: trace compaction request; add return parameter 'trace' to applierV3.Compaction() mvcc: trace compaction request; add input parameter 'trace' to KV.Compact()
2019-10-09 12:40:12 -07:00
daa432cfa7
etcdserver: add put request steps. mvcc: add put request steps; add trace to KV.Write() as input parameter.
2019-10-09 12:40:12 -07:00
8717327697
pkg: use zap logger to format the structure log output.
2019-10-09 12:40:12 -07:00
4f1bbff888
pkg: add field to record additional detail of trace; add stepThreshold to reduce log volume.
2019-10-09 12:40:12 -07:00
28bb8037d9
pkg: create package traceutil for tracing. mvcc: add tracing steps:range from the in-memory index tree; range from boltdb. etcdserver: add tracing steps: agreement among raft nodes before linerized reading; authentication; filter and sort kv pairs; assemble the response.
2019-10-09 12:40:12 -07:00
ccbbb2f8d6
mvcc: add store revision metrics
...
Add experimental metrics etcd_debugging_mvcc_current_revision and
etcd_debugging_mvcc_compact_revision.
2019-09-06 17:03:21 -07:00
0161e72d8d
mvcc: keep 64-bit alignment in "store" struct
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com >
2019-08-15 13:31:52 -07:00
1e213b7ab6
*: Add experimental-compaction-batch-limit flag
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com >
2019-08-15 13:31:39 -07:00
b30c1eb2c8
mvcc: Optimize compaction for short commit pauses
2019-08-15 13:29:28 -07:00
8c8f6f4b01
mvcc: fix typo in test
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com >
2019-08-06 15:09:55 -07:00
328fdc2150
mvcc: add TODOs
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com >
2019-08-01 14:45:21 -07:00
f82e23ab52
mvcc: add "etcd_mvcc_range_total", "etcd_mvcc_txn_total"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com >
2019-08-01 14:44:55 -07:00
dde3c5fc40
mvcc: clean up metrics names, add missing register calls
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com >
2019-08-01 14:44:55 -07:00
456c91b63a
Merge pull request #10959 from gyuho/adt
...
pkg/adt: refactor + add more test cases
2019-08-01 12:22:15 -07:00
6a0811a949
*: use new adt.IntervalTree interface
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com >
2019-07-31 22:23:13 -07:00
f46ee91863
metrics: promote etcd_debugging_mvcc put_total and delete_total
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com >
2019-08-01 01:28:07 +00:00
2c5162af5c
Merge pull request #10523 from jingyih/fully_concurrent_reads
...
mvcc: fully concurrent read
2019-06-14 12:25:17 +08:00
55066ebdc0
mvcc: address comments
2019-06-13 18:05:50 -07:00
2a9320e944
mvcc: add TestConcurrentReadTxAndWrite
...
Add TestConcurrentReadTxAndWrite which creates random reads and writes,
and ensures reads always see latest writes.
2019-06-11 17:05:41 -07:00
b873fbd127
mvcc/backend: correct RLock in test
...
Should use RLock instead of Lock.
2019-06-11 16:24:44 -07:00
693afd8e5e
mvcc/backend: add unit test for ConcurrentReadTx
...
Add TestConcurrentReadTx to ensure concurrentReadTx can see all the
prior writes which are stored on the read buffer.
2019-06-10 18:30:21 -07:00
ad80752715
mvcc: add metrics dbOpenReadTxn
...
Expose the number of currently open read transactions in backend to
metrics endpoint.
2019-06-10 17:20:04 -07:00
1caaa9ed4a
test: test update for Go 1.12.5 and related changes
...
Update to Go 1.12.5 testing. Remove deprecated unused and gosimple
pacakges, and mask staticcheck 1006. Also, fix unconvert errors related
to unnecessary type conversions and following staticcheck errors:
- remove redundant return statements
- use for range instead of for select
- use time.Since instead of time.Now().Sub
- omit comparison to bool constant
- replace T.Fatal and T.Fatalf in tests with T.Error and T.Fatalf respectively because the goroutine calls T.Fatal must be called in the same goroutine as the test
- fix error strings that should not be capitalized
- use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...))
- use he status code of Canceled instead of grpc.ErrClientConnClosing which is deprecated
- use use status.Errorf instead of grpc.Errorf which is deprecated
Related #10528 #10438
2019-06-05 17:02:05 -04:00
4345f74426
mvcc: revert change made by 10526
...
Revert #10526 and its followup #10699 .
2019-05-29 17:41:33 -07:00
34bd797e67
*: revert module import paths
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com >
2019-05-28 15:39:35 -07:00
9ab3572662
Doc: Fix typo in revision.go
2019-05-16 14:29:10 +01:00
a73fb85c0c
mvcc: fully concurrent read
2019-05-08 19:11:23 -07:00
e899023f3f
Merge pull request #10640 from shrajfr12/gomodulecompat
...
Fix module path to have the major version to comply with go modules specification.
2019-05-01 22:46:03 -07:00
88922b0d08
mvcc: protect tree clone with write lock
2019-05-01 12:34:09 -07:00
9150bf52d6
go modules: Fix module path version to include version number
2019-04-26 15:29:50 -07:00
c5cb5509ea
mvcc: fix db_compaction_total_duration_milliseconds
2019-04-16 10:32:21 +08:00
93732df3ef
mvcc: release lock early when traversing index
...
Make a copy-on-write clone of index tree when traversing. So that lock
can be released right after the clone to improve backend concurrency.
2019-03-06 14:26:17 -08:00
1c19f126cb
mvcc/backend: rename ReadTx Lock() to RLock()
...
For better code readability, renaming Lock() to RLock() in ReadTx
interface.
2019-03-05 13:53:27 -08:00