Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into values-join-planner
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <andres@planetscale.com>
  • Loading branch information
systay committed Feb 21, 2025
2 parents c558b3f + 0a6f982 commit 9efb1f9
Show file tree
Hide file tree
Showing 150 changed files with 8,991 additions and 902 deletions.
8 changes: 8 additions & 0 deletions .clomonitor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CLOMonitor metadata file
# This file must be located at the root of the repository

# Checks exemptions
exemptions:
- check: slack_presence # Check identifier (see https://github.com/cncf/clomonitor/blob/main/docs/checks.md#exemptions)
reason: "This project has a separate Slack workspace that predates its donation to CNCF. A link to it is present in the README." # Justification of this exemption (mandatory, it will be displayed on the UI)

2 changes: 1 addition & 1 deletion .github/workflows/static_checks_etc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ jobs:
- name: Install golangci-lint
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true'
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.2
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.5

- name: Clean Env
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade_downgrade_test_backups_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.5
go-version: 1.24.0

- name: Set up python
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.5
go-version: 1.24.0

- name: Set up python
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.5
go-version: 1.24.0

- name: Set up python
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.5
go-version: 1.24.0

- name: Set up python
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.5
go-version: 1.24.0

- name: Set up python
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.5
go-version: 1.24.0

- name: Set up python
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.5
go-version: 1.24.0

- name: Set up python
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.5
go-version: 1.24.0

- name: Set up python
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade_downgrade_test_semi_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.5
go-version: 1.24.0

- name: Set up python
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
go: 1.23
go: 1.24
timeout: 10m

linters-settings:
Expand Down Expand Up @@ -191,4 +191,4 @@ issues:

# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.52.2 # use the fixed version to not introduce new linters unexpectedly
golangci-lint-version: 1.64.5 # use the fixed version to not introduce new linters unexpectedly
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ $(PROTO_GO_OUTS): minimaltools install_protoc-gen-go proto/*.proto
# This rule builds the bootstrap images for all flavors.
DOCKER_IMAGES_FOR_TEST = mysql80 mysql84 percona80
DOCKER_IMAGES = common $(DOCKER_IMAGES_FOR_TEST)
BOOTSTRAP_VERSION=41
BOOTSTRAP_VERSION=42
ensure_bootstrap_version:
find docker/ -type f -exec sed -i "s/^\(ARG bootstrap_version\)=.*/\1=${BOOTSTRAP_VERSION}/" {} \;
sed -i 's/\(^.*flag.String(\"bootstrap-version\",\) *\"[^\"]\+\"/\1 \"${BOOTSTRAP_VERSION}\"/' test.go
Expand Down
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,36 @@

# Vitess

Vitess is a database clustering system for horizontal scaling of MySQL
through generalized sharding.
Vitess is a cloud-native horizontally-scalable distributed database system that is built around MySQL.
Vitess can achieve unlimited scaling through generalized sharding.

By encapsulating shard-routing logic, Vitess allows application code and
database queries to remain agnostic to the distribution of data onto
multiple shards. With Vitess, you can even split and merge shards as your needs
Vitess allows application code and database queries to remain agnostic to the distribution of data onto
multiple database servers. With Vitess, you can even split and merge shards as your needs
grow, with an atomic cutover step that takes only a few seconds.

Vitess has been a core component of YouTube's database infrastructure
since 2011, and has grown to encompass tens of thousands of MySQL nodes.
Vitess was a core component of YouTube's database infrastructure
from 2011, and grew to encompass tens of thousands of MySQL nodes.
Starting in 2015, Vitess was adopted by many other large companies, including Slack, Square (now Block), and JD.com.

For more about Vitess, please visit [vitess.io](https://vitess.io).

Vitess has a growing community. [View the list of adopters](https://github.com/vitessio/vitess/blob/main/ADOPTERS.md).
## Community

Vitess has a growing [community](https://github.com/vitessio/vitess/blob/main/ADOPTERS.md).

If you are interested in contributing or participating in our monthly community meetings, please visit the [Community page on our website](https://vitess.io/community/).

We also maintain a [roadmap](https://vitess.io/docs/roadmap/) on our website.

Follow our [blog](https://blog.vitess.io/) for low-frequency updates like new features and releases.

## Reporting a Problem, Issue, or Bug
To report a problem, create a [GitHub issue](https://github.com/vitessio/vitess/issues).

To report a problem, create a [GitHub issue](https://github.com/vitessio/vitess/issues).

For topics that are better discussed live, please join the [Vitess Slack](https://vitess.io/slack) workspace.
You may post any questions on the #general channel or join some of the special-interest channels.

Follow [Vitess Blog](https://blog.vitess.io/) for low-frequency updates like new features and releases.

## Security

### Reporting Security Vulnerabilities
Expand Down
2 changes: 1 addition & 1 deletion build.env
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
source ./tools/shell_functions.inc

go version >/dev/null 2>&1 || fail "Go is not installed or is not in \$PATH. See https://vitess.io/contributing/build-from-source for install instructions."
goversion_min 1.23.5 || echo "Go version reported: `go version`. Version 1.23.5+ recommended. See https://vitess.io/contributing/build-from-source for install instructions."
goversion_min 1.24.0 || echo "Go version reported: `go version`. Version 1.24.0+ recommended. See https://vitess.io/contributing/build-from-source for install instructions."

mkdir -p dist
mkdir -p bin
Expand Down
5 changes: 4 additions & 1 deletion docker/bootstrap/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,7 @@ List of changes between bootstrap image versions.
## [41] - 2025-01-15
### Changes
- Update base image to bookworm
- Add MySQL84 image
- Add MySQL84 image

## [42] - 2025-02-14
- Update build to golang 1.24.0
2 changes: 1 addition & 1 deletion docker/bootstrap/Dockerfile.common
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 golang:1.23.5-bookworm
FROM --platform=linux/amd64 golang:1.24.0-bookworm

# Install Vitess build dependencies
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
Expand Down
11 changes: 10 additions & 1 deletion docker/lite/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM --platform=linux/amd64 golang:1.23.5-bookworm AS builder
FROM --platform=linux/amd64 golang:1.24.0-bookworm AS builder

# Allows docker builds to set the BUILD_NUMBER
ARG BUILD_NUMBER

# Allows docker builds to set the BUILD_GIT_BRANCH
ARG BUILD_GIT_BRANCH

# Allows docker builds to set the BUILD_GIT_REV
ARG BUILD_GIT_REV

# Allows docker builds to set the BUILD_TIME
ARG BUILD_TIME

WORKDIR /vt/src/vitess.io/vitess

# Create vitess user
Expand Down
11 changes: 10 additions & 1 deletion docker/lite/Dockerfile.mysql84
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM --platform=linux/amd64 golang:1.23.5-bookworm AS builder
FROM --platform=linux/amd64 golang:1.24.0-bookworm AS builder

# Allows docker builds to set the BUILD_NUMBER
ARG BUILD_NUMBER

# Allows docker builds to set the BUILD_GIT_BRANCH
ARG BUILD_GIT_BRANCH

# Allows docker builds to set the BUILD_GIT_REV
ARG BUILD_GIT_REV

# Allows docker builds to set the BUILD_TIME
ARG BUILD_TIME

WORKDIR /vt/src/vitess.io/vitess

# Create vitess user
Expand Down
11 changes: 10 additions & 1 deletion docker/lite/Dockerfile.percona80
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM --platform=linux/amd64 golang:1.23.5-bookworm AS builder
FROM --platform=linux/amd64 golang:1.24.0-bookworm AS builder

# Allows docker builds to set the BUILD_NUMBER
ARG BUILD_NUMBER

# Allows docker builds to set the BUILD_GIT_BRANCH
ARG BUILD_GIT_BRANCH

# Allows docker builds to set the BUILD_GIT_REV
ARG BUILD_GIT_REV

# Allows docker builds to set the BUILD_TIME
ARG BUILD_TIME

WORKDIR /vt/src/vitess.io/vitess

# Create vitess user
Expand Down
2 changes: 1 addition & 1 deletion docker/vttestserver/Dockerfile.mysql80
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM --platform=linux/amd64 golang:1.23.5-bookworm AS builder
FROM --platform=linux/amd64 golang:1.24.0-bookworm AS builder

# Allows docker builds to set the BUILD_NUMBER
ARG BUILD_NUMBER
Expand Down
2 changes: 1 addition & 1 deletion docker/vttestserver/Dockerfile.mysql84
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM --platform=linux/amd64 golang:1.23.5-bookworm AS builder
FROM --platform=linux/amd64 golang:1.24.0-bookworm AS builder

# Allows docker builds to set the BUILD_NUMBER
ARG BUILD_NUMBER
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module vitess.io/vitess

go 1.23.5
go 1.24.0

require (
cloud.google.com/go/storage v1.50.0
Expand Down
5 changes: 0 additions & 5 deletions go/bytes2/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ type Buffer struct {
bytes []byte
}

// NewBuffer is equivalent to bytes.NewBuffer.
func NewBuffer(b []byte) *Buffer {
return &Buffer{bytes: b}
}

// Write is equivalent to bytes.Buffer.Write.
func (buf *Buffer) Write(b []byte) (int, error) {
buf.bytes = append(buf.bytes, b...)
Expand Down
2 changes: 1 addition & 1 deletion go/bytes2/buffer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
)

func TestBuffer(t *testing.T) {
b := NewBuffer(nil)
var b Buffer

// Test Write function
b.Write([]byte("ab"))
Expand Down
10 changes: 0 additions & 10 deletions go/cache/theine/bf/bf.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@ func New(falsePositiveRate float64) *Bloomfilter {
return d
}

// create new bloomfilter with given size in bytes
func NewWithSize(size uint32) *Bloomfilter {
d := &Bloomfilter{}
bits := size * 8
m := nextPowerOfTwo(uint32(bits))
d.M = m
d.Filter = newbv(m)
return d
}

func (d *Bloomfilter) EnsureCapacity(capacity int) {
if capacity <= d.Capacity {
return
Expand Down
5 changes: 1 addition & 4 deletions go/cache/theine/bf/bf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ import (
)

func TestBloom(t *testing.T) {
bf := NewWithSize(5)
bf.FalsePositiveRate = 0.1
bf.EnsureCapacity(5)
bf := New(0.1)
bf.EnsureCapacity(500)
bf.EnsureCapacity(200)

exist := bf.Insert(123)
require.False(t, exist)
Expand Down
2 changes: 1 addition & 1 deletion go/cmd/vtclient/cli/vtclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ var (
seqChan = make(chan int, 10)
)

func init() {
func InitializeFlags() {
servenv.MoveFlagsToCobraCommand(Main)

Main.Flags().StringVar(&server, "server", server, "vtgate server to connect to")
Expand Down
2 changes: 2 additions & 0 deletions go/cmd/vtclient/cli/vtclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ func TestVtclient(t *testing.T) {
},
}

// initialize the vtclient flags before running any commands
InitializeFlags()
for _, q := range queries {
// Run main function directly and not as external process. To achieve this,
// overwrite os.Args which is used by pflag.Parse().
Expand Down
1 change: 1 addition & 0 deletions go/cmd/vtclient/vtclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
)

func main() {
cli.InitializeFlags()
if err := cli.Main.Execute(); err != nil {
log.Exit(err)
}
Expand Down
8 changes: 0 additions & 8 deletions go/cmd/vtctldclient/command/framework_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,6 @@ func TabletKeyspaceShard(t *testing.T, keyspace, shard string) TabletOption {
}
}

// ForceInitTablet is the tablet option to set the 'force' flag during InitTablet
func ForceInitTablet() TabletOption {
return func(tablet *topodatapb.Tablet) {
// set the force_init field into the portmap as a hack
tablet.PortMap["force_init"] = 1
}
}

// StartHTTPServer is the tablet option to start the HTTP server when
// starting a tablet.
func StartHTTPServer() TabletOption {
Expand Down
Loading

0 comments on commit 9efb1f9

Please sign in to comment.