1870 Commits

Author SHA1 Message Date
Benjamin Wang
41ab04d21b
Merge pull request #966 from sxllwx/chore/export-raw-error
chore: use %w to wrap  returned err by unix funcs
2025-06-05 15:48:55 +01:00
Benjamin Wang
8f3c534f9a Move MaxMapSize and MaxAllocSize into internal/common
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-06-05 15:17:24 +01:00
Benjamin Wang
624e8a28c3 Add an unit test to reproduce the panick caused by huge value size
$ go test -run TestDB_HugeValue -v
seed: 44000
quick settings: count=5, items=1000, ksize=1024, vsize=1024
=== RUN   TestDB_HugeValue
--- FAIL: TestDB_HugeValue (0.06s)
panic: runtime error: slice bounds out of range [::268435459] with length 268435455 [recovered]
	panic: runtime error: slice bounds out of range [::268435459] with length 268435455

goroutine 7 [running]:
testing.tRunner.func1.2({0x1031ae420, 0x14000016090})
	/Users/wachao/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.3.darwin-arm64/src/testing/testing.go:1734 +0x1ac
testing.tRunner.func1()
	/Users/wachao/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.3.darwin-arm64/src/testing/testing.go:1737 +0x334
panic({0x1031ae420?, 0x14000016090?})
	/Users/wachao/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.3.darwin-arm64/src/runtime/panic.go:792 +0x124
go.etcd.io/bbolt/internal/common.UnsafeByteSlice(...)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/internal/common/unsafe.go:26
go.etcd.io/bbolt/internal/common.WriteInodeToPage({0x14000104f80?, 0x1, 0x4?}, 0x14010210000)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/internal/common/inode.go:81 +0x288
go.etcd.io/bbolt.(*node).write(0x1400017a000?, 0x4001?)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/node.go:199 +0xa0
go.etcd.io/bbolt.(*node).spill(0x1400014e0e0)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/node.go:334 +0x1dc
go.etcd.io/bbolt.(*Bucket).spill(0x14000104f40)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/bucket.go:786 +0x278
go.etcd.io/bbolt.(*Bucket).spill(0x1400017a018)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/bucket.go:753 +0xc0
go.etcd.io/bbolt.(*Tx).Commit(0x1400017a000)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/tx.go:204 +0x260
go.etcd.io/bbolt.(*DB).Update(0x1031cdf90?, 0x1400007cf28)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/db.go:922 +0xc4
go.etcd.io/bbolt_test.TestDB_HugeValue(0x14000003c00)
	/Users/wachao/go/src/github.com/ahrtr/bbolt/db_test.go:1560 +0x110
testing.tRunner(0x14000003c00, 0x1031c9ef0)
	/Users/wachao/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.3.darwin-arm64/src/testing/testing.go:1792 +0xe4
created by testing.(*T).Run in goroutine 1
	/Users/wachao/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.3.darwin-arm64/src/testing/testing.go:1851 +0x374
exit status 2
FAIL	go.etcd.io/bbolt	0.285s

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-06-05 14:33:25 +01:00
Benjamin Wang
a1ee7e4754
Merge pull request #903 from Elbehery/20250210-add-release-script
release: add release script
2025-06-04 13:11:55 +01:00
Mustafa Elbehery
6ab5f84f93 release: add release script
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2025-06-04 12:25:04 +02:00
wangxiang
2064f05473 chore: use %w to wrap returned err by unix funcs
Signed-off-by: wangxiang <scottwangsxll@gmail.com>
2025-05-22 14:01:18 +08:00
Benjamin Wang
8fcab37470
Merge pull request #963 from Elbehery/20250519-mmorel-35-staticcheck
fix staticcheck issues
2025-05-21 10:43:31 +01:00
Mustafa Elbehery
bf4a727b92 fix QF1004, QF1011, ST1006, ST1016 and ST1023 issues
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
Co-authored-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-19 23:25:26 +02:00
Benjamin Wang
c0f7c3c0ff
Merge pull request #959 from etcd-io/dependabot/github_actions/actions/setup-go-5.5.0
build(deps): Bump actions/setup-go from 5.4.0 to 5.5.0
2025-05-12 17:26:26 +01:00
dependabot[bot]
96234b3415
build(deps): Bump actions/setup-go from 5.4.0 to 5.5.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](0aaccfd150...d35c59abb0)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 5.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-12 14:16:52 +00:00
Benjamin Wang
c3550d92a4
Merge pull request #954 from mmorel-35/golangci-lint@v2
chore: bump golangci-lint to v2.1.6
2025-05-09 07:42:51 +01:00
Benjamin Wang
6b569fe5ac
Merge pull request #955 from Elbehery/20250507-bump-go-1.24.3
Bump Go to 1.24.3
2025-05-07 15:26:39 +01:00
Mustafa Elbehery
87e2705e38 Bump Go to 1.24.3
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2025-05-07 14:28:40 +02:00
Benjamin Wang
10f9a50714
Merge pull request #953 from etcd-io/dependabot/go_modules/golang.org/x/sys-0.33.0
build(deps): Bump golang.org/x/sys from 0.32.0 to 0.33.0
2025-05-06 07:40:20 +01:00
dependabot[bot]
028d0897b3
build(deps): Bump golang.org/x/sys from 0.32.0 to 0.33.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.32.0 to 0.33.0.
- [Commits](https://github.com/golang/sys/compare/v0.32.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 18:26:46 +00:00
Benjamin Wang
cf12ecd310
Merge pull request #952 from etcd-io/dependabot/go_modules/golang.org/x/sync-0.14.0
build(deps): Bump golang.org/x/sync from 0.13.0 to 0.14.0
2025-05-05 19:25:35 +01:00
Matthieu MOREL
675a3be115 chore: bump golangci-lint to v2.1.6
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-05-05 18:02:36 +00:00
dependabot[bot]
7884034581
build(deps): Bump golang.org/x/sync from 0.13.0 to 0.14.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.13.0 to 0.14.0.
- [Commits](https://github.com/golang/sync/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-version: 0.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 15:07:46 +00:00
Matthew Sainsbury
88d2b54695
add support for data file size limit (#929)
* add support for data file size limit
closes #928

Signed-off-by: Matthew Sainsbury <matthew@sainsbury.io>

* respond to PR feedback

Signed-off-by: Matthew Sainsbury <matthew@sainsbury.io>

---------

Signed-off-by: Matthew Sainsbury <matthew@sainsbury.io>
2025-04-25 18:46:51 +01:00
Benjamin Wang
6e830d93bc
Merge pull request #948 from fuweid/dmesg-if-failure
test: deflaky dmflakey.Teardown issue
2025-04-24 10:47:04 +01:00
Wei Fu
50a6d91afb tests: deflaky dmflakey.TearDown issue
REF: #947

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2025-04-23 22:12:33 -04:00
Wei Fu
156953cb2d .github: dump dmesg if failure
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2025-04-23 22:11:07 -04:00
Benjamin Wang
ffa3a7d617
Merge pull request #942 from ahrtr/initial_mmap_size_20240409
Clarify the effect of InitialMmapSize on Windows platform
2025-04-09 15:27:08 +01:00
Benjamin Wang
8a03cee17b Clarify the effect of InitialMmapSize on Windows platform
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2025-04-09 10:13:46 +01:00
Benjamin Wang
53df586516
Merge pull request #936 from joshjms/main
[main] Bump go to 1.24.2
2025-04-08 10:04:47 +01:00
Benjamin Wang
6ff4c865ce
Merge pull request #935 from etcd-io/dependabot/go_modules/golang.org/x/sync-0.13.0
build(deps): Bump golang.org/x/sync from 0.12.0 to 0.13.0
2025-04-08 09:41:38 +01:00
dependabot[bot]
0431f4f744
build(deps): Bump golang.org/x/sync from 0.12.0 to 0.13.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.12.0 to 0.13.0.
- [Commits](https://github.com/golang/sync/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-version: 0.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 07:22:31 +00:00
Benjamin Wang
7a2ab20e22
Merge pull request #934 from etcd-io/dependabot/go_modules/golang.org/x/sys-0.32.0
build(deps): Bump golang.org/x/sys from 0.31.0 to 0.32.0
2025-04-08 08:21:24 +01:00
joshjms
65cc569500 bump go 1.24.2
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-04-08 14:37:28 +08:00
dependabot[bot]
b4a4453019
build(deps): Bump golang.org/x/sys from 0.31.0 to 0.32.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.31.0 to 0.32.0.
- [Commits](https://github.com/golang/sys/compare/v0.31.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-07 14:59:38 +00:00
Benjamin Wang
a8c943f09d
Merge pull request #933 from etcd-io/dependabot/github_actions/actions/setup-go-5.4.0
build(deps): Bump actions/setup-go from 5.3.0 to 5.4.0
2025-03-31 17:39:13 +01:00
dependabot[bot]
c25038e34c
build(deps): Bump actions/setup-go from 5.3.0 to 5.4.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](f111f3307d...0aaccfd150)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 15:02:32 +00:00
Benjamin Wang
914ccefafb
Merge pull request #927 from etcd-io/dependabot/github_actions/golangci/golangci-lint-action-6.5.1
build(deps): Bump golangci/golangci-lint-action from 6.5.0 to 6.5.1
2025-03-18 15:18:09 +00:00
dependabot[bot]
99c51dc98c
build(deps): Bump golangci/golangci-lint-action from 6.5.0 to 6.5.1
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.5.0 to 6.5.1.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](2226d7cb06...4696ba8bab)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-17 14:51:54 +00:00
Benjamin Wang
d21c89f288
Merge pull request #926 from ivanvc/use-github-runners-for-arm64-robustness-tests
Use GitHub runners for arm64 robustness tests
2025-03-13 14:23:54 +00:00
Ivan Valdes
36a2a0eda4
github/workflows: add ARM64 tests
Restore ARM64 test workflows. Remove the conditional to run only ARM
tests in the upstream repository, as GitHub ARM runners are now publicly
available.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-03-12 07:18:23 -07:00
Ivan Valdes
67b9853f12
github/workflows: use ARM64 runners for robustness tests
Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-03-12 07:18:23 -07:00
Benjamin Wang
eb9c76f15b
Merge pull request #925 from Elbehery/20250311-bump-go1.24.1
Bump go 1.24.1
2025-03-12 09:43:33 +00:00
Mustafa Elbehery
dc3e34b318 Bump go 1.24.1
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2025-03-11 21:23:04 +01:00
Benjamin Wang
d13c7f25ca
Merge pull request #907 from Elbehery/20250216-bump-go1.24.0
Bump go 1.24.0
2025-03-11 17:50:59 +00:00
Mustafa Elbehery
24c5a2be46 Bump go 1.24.0
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2025-03-11 11:46:19 +01:00
Benjamin Wang
9b88cf72b6
Merge pull request #924 from ivanvc/update-golang-x-dependencies
[2025-03-10] Manual dependency update
2025-03-11 07:41:20 +00:00
Ivan Valdes
55ed00504e
build(deps): Bump golang.org/x/sys from 0.30.0 to 0.31.0
Dependency update from: https://github.com/etcd-io/bbolt/pull/922

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-03-10 16:47:19 -07:00
Ivan Valdes
d08e835e29
build(deps): Bump golang.org/x/sync from 0.11.0 to 0.12.0
Dependency update from https://github.com/etcd-io/bbolt/pull/923

Signed-off-by: Ivan Valdes <ivan@vald.es>
2025-03-10 16:25:10 -07:00
Benjamin Wang
64b4268a9c
Merge pull request #913 from mmorel-35/golangci-lint
chore: setup golangci-lint config file
2025-03-06 15:30:54 +00:00
Benjamin Wang
526ef1e15f
Merge pull request #916 from Elbehery/20250221-bump-go-linter-1.24-win
bump golangci-lint v1.64.5-win
2025-02-21 19:22:56 +00:00
Mustafa Elbehery
09ce777911 bump golangci-lint v1.64.5-win
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2025-02-21 18:56:01 +01:00
Benjamin Wang
02646af98b
Merge pull request #915 from Elbehery/20250221-bump-go-linter-1.24
bump golangci-lint v1.64.5
2025-02-21 10:49:14 +00:00
Mustafa Elbehery
a8be651e3b bump golangci-lint v1.64.5
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2025-02-21 10:09:51 +01:00
Benjamin Wang
4b8d9e7d6d
Merge pull request #912 from etcd-io/dependabot/go_modules/github.com/spf13/cobra-1.9.1
build(deps): Bump github.com/spf13/cobra from 1.8.1 to 1.9.1
2025-02-20 08:42:31 +00:00