Skip to content

Commit

Permalink
Merge branch 'etcd-io:main' into walmlock
Browse files Browse the repository at this point in the history
  • Loading branch information
tjungblu authored Dec 6, 2022
2 parents 5ff9052 + a4c6d1b commit 7edec46
Show file tree
Hide file tree
Showing 217 changed files with 1,979 additions and 28,461 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linearizability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
make build
mkdir -p /tmp/linearizability
cat server/etcdserver/raft.fail.go
EXPECT_DEBUG=true GO_TEST_FLAGS=-v RESULTS_DIR=/tmp/linearizability make test-linearizability
EXPECT_DEBUG=true GO_TEST_FLAGS='-v --count 60 --failfast --run TestLinearizability' RESULTS_DIR=/tmp/linearizability make test-linearizability
- uses: actions/upload-artifact@v2
if: always()
with:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG/CHANGELOG-3.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Previous change logs can be found at [CHANGELOG-3.4](https://github.com/etcd-io/

### etcd server
- Fix [Remove memberID from data corrupt alarm](https://github.com/etcd-io/etcd/pull/14852).
- Fix [non mutating requests pass through quotaKVServer when NOSPACE](https://github.com/etcd-io/etcd/pull/14884)


<hr>
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG/CHANGELOG-3.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v3.6.0).
### Package `raft`
- Send empty `MsgApp` when entry in-flight limits are exceeded. See [pull/14633](https://github.com/etcd-io/etcd/pull/14633).
- Add [MaxInflightBytes](https://github.com/etcd-io/etcd/pull/14624) setting in `raft.Config` for better flow control of entries.
- [Decouple raft from etcd](https://github.com/etcd-io/etcd/issues/14713). Migrated raft to a separate [repository](https://github.com/etcd-io/raft), and renamed raft module to `go.etcd.io/raft/v3`.

### etcd server

Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ Setup environment:
- For ubuntu and debian run `sudo apt-get install build-essentials`
- Verify that everything is installed by running `make build`

Note: `make build` runs with `-v`. Other build flags can be added through env `GO_BUILD_FLAGS`, **if required**. Eg.,
```console
GO_BUILD_FLAGS="-buildmode=pie" make build
```

[file an issue]: https://github.com/etcd-io/etcd/issues/new/choose

## Implement your change
Expand Down
606 changes: 604 additions & 2 deletions Documentation/contributor-guide/modules-future.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions Documentation/contributor-guide/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ There are following modules:
- **go.etcd.io/etcd/client/v2** - legacy client library used to contact etcd
over HTTP protocol. Deprecated. All new usage should depend on /v3 library.

- **go.etcd.io/etcd/raft/v3** - implementation of distributed consensus
protocol. Should have no etcd specific code.
- **go.etcd.io/raft/v3** - implementation of distributed consensus
protocol. Should have no etcd specific code. Hosted in a separate repository:
https://github.com/etcd-io/raft.

- **go.etcd.io/etcd/server/v3** - etcd implementation.
The code in this package is etcd internal and should not be consumed
Expand Down
490 changes: 489 additions & 1 deletion Documentation/contributor-guide/modules.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: build
build:
GO_BUILD_FLAGS="-v" ./scripts/build.sh
GO_BUILD_FLAGS="${GO_BUILD_FLAGS} -v" ./scripts/build.sh
./bin/etcd --version
./bin/etcdctl version
./bin/etcdutl version
Expand Down Expand Up @@ -141,4 +141,5 @@ clean:
rm -rf ./release
rm -rf ./coverage/*.err ./coverage/*.out
rm -rf ./tests/e2e/default.proxy
rm -rf ./bin/shellcheck*
find ./ -name "127.0.0.1:*" -o -name "localhost:*" -o -name "*.log" -o -name "agent-*" -o -name "*.coverprofile" -o -name "testname-proxy-*" -delete
62 changes: 4 additions & 58 deletions bill-of-materials.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@
}
]
},
{
"project": "github.com/certifi/gocertifi",
"licenses": [
{
"type": "Mozilla Public License 2.0",
"confidence": 1
}
]
},
{
"project": "github.com/cespare/xxhash/v2",
"licenses": [
Expand All @@ -80,33 +71,6 @@
}
]
},
{
"project": "github.com/cockroachdb/datadriven",
"licenses": [
{
"type": "Apache License 2.0",
"confidence": 1
}
]
},
{
"project": "github.com/cockroachdb/errors",
"licenses": [
{
"type": "Apache License 2.0",
"confidence": 1
}
]
},
{
"project": "github.com/cockroachdb/logtags",
"licenses": [
{
"type": "Apache License 2.0",
"confidence": 1
}
]
},
{
"project": "github.com/coreos/go-semver/semver",
"licenses": [
Expand Down Expand Up @@ -161,15 +125,6 @@
}
]
},
{
"project": "github.com/getsentry/raven-go",
"licenses": [
{
"type": "BSD 3-clause \"New\" or \"Revised\" License",
"confidence": 0.9663865546218487
}
]
},
{
"project": "github.com/go-logr/logr",
"licenses": [
Expand Down Expand Up @@ -350,15 +305,6 @@
}
]
},
{
"project": "github.com/pkg/errors",
"licenses": [
{
"type": "BSD 2-clause \"Simplified\" License",
"confidence": 1
}
]
},
{
"project": "github.com/pmezard/go-difflib/difflib",
"licenses": [
Expand Down Expand Up @@ -549,7 +495,7 @@
]
},
{
"project": "go.etcd.io/etcd/raft/v3",
"project": "go.etcd.io/etcd/server/v3",
"licenses": [
{
"type": "Apache License 2.0",
Expand All @@ -558,7 +504,7 @@
]
},
{
"project": "go.etcd.io/etcd/server/v3",
"project": "go.etcd.io/etcd/tests/v3",
"licenses": [
{
"type": "Apache License 2.0",
Expand All @@ -567,7 +513,7 @@
]
},
{
"project": "go.etcd.io/etcd/tests/v3",
"project": "go.etcd.io/etcd/v3",
"licenses": [
{
"type": "Apache License 2.0",
Expand All @@ -576,7 +522,7 @@
]
},
{
"project": "go.etcd.io/etcd/v3",
"project": "go.etcd.io/raft/v3",
"licenses": [
{
"type": "Apache License 2.0",
Expand Down
1 change: 0 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ fixes:
- "go.etcd.io/etcd/client/v2/::client/v2/"
- "go.etcd.io/etcd/etcdctl/v3/::etcdctl/"
- "go.etcd.io/etcd/pkg/v3/::pkg/"
- "go.etcd.io/etcd/raft/v3/::raft/"
- "go.etcd.io/etcd/server/v3/::server/"

ignore:
Expand Down
2 changes: 1 addition & 1 deletion contrib/raftexample/httpapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"net/http"
"strconv"

"go.etcd.io/etcd/raft/v3/raftpb"
"go.etcd.io/raft/v3/raftpb"
)

// Handler for a http based key-value store backed by raft
Expand Down
2 changes: 1 addition & 1 deletion contrib/raftexample/kvstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"log"
"sync"

"go.etcd.io/etcd/raft/v3/raftpb"
"go.etcd.io/etcd/server/v3/etcdserver/api/snap"
"go.etcd.io/raft/v3/raftpb"
)

// a key-value store backed by raft
Expand Down
2 changes: 1 addition & 1 deletion contrib/raftexample/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"flag"
"strings"

"go.etcd.io/etcd/raft/v3/raftpb"
"go.etcd.io/raft/v3/raftpb"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions contrib/raftexample/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ import (

"go.etcd.io/etcd/client/pkg/v3/fileutil"
"go.etcd.io/etcd/client/pkg/v3/types"
"go.etcd.io/etcd/raft/v3"
"go.etcd.io/etcd/raft/v3/raftpb"
"go.etcd.io/etcd/server/v3/etcdserver/api/rafthttp"
"go.etcd.io/etcd/server/v3/etcdserver/api/snap"
stats "go.etcd.io/etcd/server/v3/etcdserver/api/v2stats"
"go.etcd.io/etcd/server/v3/storage/wal"
"go.etcd.io/etcd/server/v3/storage/wal/walpb"
"go.etcd.io/raft/v3"
"go.etcd.io/raft/v3/raftpb"

"go.uber.org/zap"
)
Expand Down
2 changes: 1 addition & 1 deletion contrib/raftexample/raft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"reflect"
"testing"

"go.etcd.io/etcd/raft/v3/raftpb"
"go.etcd.io/raft/v3/raftpb"
)

func TestProcessMessages(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion contrib/raftexample/raftexample_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"testing"
"time"

"go.etcd.io/etcd/raft/v3/raftpb"
"go.etcd.io/raft/v3/raftpb"
)

func getSnapshotFn() (func() ([]byte, error), <-chan struct{}) {
Expand Down
2 changes: 1 addition & 1 deletion etcdutl/etcdutl/backup_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"go.etcd.io/etcd/client/pkg/v3/types"
"go.etcd.io/etcd/pkg/v3/idutil"
"go.etcd.io/etcd/pkg/v3/pbutil"
"go.etcd.io/etcd/raft/v3/raftpb"
"go.etcd.io/etcd/server/v3/etcdserver/api/membership"
"go.etcd.io/etcd/server/v3/etcdserver/api/snap"
"go.etcd.io/etcd/server/v3/etcdserver/api/v2store"
Expand All @@ -36,6 +35,7 @@ import (
"go.etcd.io/etcd/server/v3/storage/wal"
"go.etcd.io/etcd/server/v3/storage/wal/walpb"
"go.etcd.io/etcd/server/v3/verify"
"go.etcd.io/raft/v3/raftpb"

bolt "go.etcd.io/bbolt"
"go.uber.org/zap"
Expand Down
3 changes: 1 addition & 2 deletions etcdutl/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ replace (
go.etcd.io/etcd/client/v2 => ../client/v2
go.etcd.io/etcd/client/v3 => ../client/v3
go.etcd.io/etcd/pkg/v3 => ../pkg
go.etcd.io/etcd/raft/v3 => ../raft
go.etcd.io/etcd/server/v3 => ../server
)

Expand All @@ -30,8 +29,8 @@ require (
go.etcd.io/etcd/client/pkg/v3 v3.6.0-alpha.0
go.etcd.io/etcd/client/v3 v3.6.0-alpha.0
go.etcd.io/etcd/pkg/v3 v3.6.0-alpha.0
go.etcd.io/etcd/raft/v3 v3.6.0-alpha.0
go.etcd.io/etcd/server/v3 v3.6.0-alpha.0
go.etcd.io/raft/v3 v3.0.0-20221201111702-eaa6808e1f7a
go.uber.org/zap v1.21.0
)

Expand Down
2 changes: 2 additions & 0 deletions etcdutl/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
go.etcd.io/raft/v3 v3.0.0-20221201111702-eaa6808e1f7a h1:Znv2XJyAf/fsJsFNt9toO8uyXwwHQ44wxqsvdSxipj4=
go.etcd.io/raft/v3 v3.0.0-20221201111702-eaa6808e1f7a/go.mod h1:eMshmuwXLWZrjHXN8ZgYrOMQRSbHqi5M84DEZWhG+o4=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
Expand Down
4 changes: 2 additions & 2 deletions etcdutl/snapshot/v3_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ import (
"go.etcd.io/etcd/client/pkg/v3/types"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/client/v3/snapshot"
"go.etcd.io/etcd/raft/v3"
"go.etcd.io/etcd/raft/v3/raftpb"
"go.etcd.io/etcd/server/v3/config"
"go.etcd.io/etcd/server/v3/etcdserver"
"go.etcd.io/etcd/server/v3/etcdserver/api/membership"
Expand All @@ -45,6 +43,8 @@ import (
"go.etcd.io/etcd/server/v3/storage/wal"
"go.etcd.io/etcd/server/v3/storage/wal/walpb"
"go.etcd.io/etcd/server/v3/verify"
"go.etcd.io/raft/v3"
"go.etcd.io/raft/v3/raftpb"
"go.uber.org/zap"
)

Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ replace (
go.etcd.io/etcd/etcdctl/v3 => ./etcdctl
go.etcd.io/etcd/etcdutl/v3 => ./etcdutl
go.etcd.io/etcd/pkg/v3 => ./pkg
go.etcd.io/etcd/raft/v3 => ./raft
go.etcd.io/etcd/server/v3 => ./server
go.etcd.io/etcd/tests/v3 => ./tests
)
Expand All @@ -29,9 +28,9 @@ require (
go.etcd.io/etcd/etcdctl/v3 v3.6.0-alpha.0
go.etcd.io/etcd/etcdutl/v3 v3.6.0-alpha.0
go.etcd.io/etcd/pkg/v3 v3.6.0-alpha.0
go.etcd.io/etcd/raft/v3 v3.6.0-alpha.0
go.etcd.io/etcd/server/v3 v3.6.0-alpha.0
go.etcd.io/etcd/tests/v3 v3.6.0-alpha.0
go.etcd.io/raft/v3 v3.0.0-20221201111702-eaa6808e1f7a
go.uber.org/zap v1.21.0
golang.org/x/time v0.0.0-20220609170525-579cf78fd858
google.golang.org/grpc v1.51.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
go.etcd.io/raft/v3 v3.0.0-20221201111702-eaa6808e1f7a h1:Znv2XJyAf/fsJsFNt9toO8uyXwwHQ44wxqsvdSxipj4=
go.etcd.io/raft/v3 v3.0.0-20221201111702-eaa6808e1f7a/go.mod h1:eMshmuwXLWZrjHXN8ZgYrOMQRSbHqi5M84DEZWhG+o4=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
Expand Down
Loading

0 comments on commit 7edec46

Please sign in to comment.