19 Commits

Author SHA1 Message Date
0739142ee3 server: errors.Is conversions
Signed-off-by: redwrasse <mail@redwrasse.io>
2024-09-29 05:23:47 -07:00
a042354947 Fix races in TestLessorRenewExtendPileup
Signed-off-by: Lucas Rodriguez <lucas.rodriguez9616@gmail.com>
2024-09-09 10:39:44 -05:00
67f17166bf Safeguard lease operations by double checking the leadership
1. ignore old leader's leases revoking request
2. double check current member's leadership before perform lease renew request
3. etcdserve: ensure current member's leadership before performing lease checkpoint request

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-15 17:53:36 +00:00
9abc895122 Goimports: Apply automated fixing to test files as well.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-29 13:04:45 +01:00
08dd8d2e0e lease: increase renew timeout to 10s
Signed-off-by: Oskar Haarklou Veileborg <ohv1020@hotmail.com>
2022-12-01 08:57:23 +01:00
0fd40769b7 lease: fix potential goroutine leak in lessor_test.go
Signed-off-by: Oskar Haarklou Veileborg <ohv1020@hotmail.com>
2022-11-30 10:17:22 +01:00
5b84b30fce fix unexpose todo
Signed-off-by: ls-2018 <acejilam@gmail.com>
2022-04-06 17:38:46 +08:00
73fc864247 tests: Pass logger to backend 2022-04-05 15:53:38 +02:00
e9edc5432c *: use T.TempDir to create temporary test directory
The directory created by `T.TempDir()` and is automatically removed when
the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-01-25 00:00:46 +08:00
7d10899d7f server: Require either cluster version v3.6 or --experimental-enable-lease-checkpoint-persist to persist lease remainingTTL
To avoid inconsistant behavior during cluster upgrade we are feature
gating persistance behind cluster version. This should ensure that
all cluster members are upgraded to v3.6 before changing behavior.

To allow backporting this fix to v3.5 we are also introducing flag
--experimental-enable-lease-checkpoint-persist that will allow for
smooth upgrade in v3.5 clusters with this feature enabled.
2021-12-02 12:26:47 +01:00
48a360aad0 lease,integration: add checkpoint scheduling after leader change
Current checkpointing mechanism is buggy. New checkpoints for any lease
are scheduled only until the first leader change. Added fix for that
and a test that will check it.
2021-11-26 14:34:19 +01:00
2a151c8982 *: move from io/ioutil to io and os packages
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-10-28 00:05:28 +08:00
5b6f4579fb server: Rename buckets to schema 2021-07-12 15:37:21 +02:00
5e40a8b00c server: Create storage package and move mvcc files to it 2021-07-12 15:37:21 +02:00
9e511665c5 etcdserver: Move get/put/delete on Lease bucket to bucket package 2021-07-01 13:34:45 +02:00
66752fef2f Represent bucket as object instead of []byte name.
Thanks to this change:
  - all the maps bucket -> buffer are indexed by int's instead of
string. No need to do: byte[] -> string -> hash conversion on each
access.
  - buckets are strongly typed in backend/mvcc API.
2021-05-18 18:58:53 +02:00
2fb6f0a74b Simplify lease management after cindex update is moved to 'hooks'. 2021-05-04 18:21:23 +02:00
aaf423e962 server: Update imports.
find -name '*.go' | xargs sed -i --follow-symlinks 's|etcd/v3/|etcd/server/v3/|g'
2020-10-26 13:02:32 +01:00
4a5e9d1261 server: Move server files to 'server' directory.
26  git mv mvcc wal auth etcdserver etcdmain proxy embed/ lease/ server
   36  git mv go.mod go.sum server
2020-10-26 12:57:19 +01:00