1366 Commits

Author SHA1 Message Date
James Blair
4154f9c642
Remove deprecated rand.Seed calls.
From go 1.20 if Seed is not called, the generator will be seeded randomly at program startup.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-19 22:16:51 +12:00
James Blair
ed506da9fd
Update to golang 1.20 minor release.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-19 21:25:39 +12:00
Benjamin Wang
c24bb8568d
Merge pull request #554 from testwill/typo
fix Continuing typo
2023-08-18 23:29:27 +08:00
guoguangwu
393e10e840 fix Continuing typo
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-08-18 22:06:31 +08:00
Benjamin Wang
0e7d8a6fe9
Merge pull request #552 from ishan16696/versionFlag
Added bbolt command line version flag to get runtime information.
2023-08-15 20:11:23 +08:00
Ishan Tyagi
a05608cf29 Added bbolt command line version flag to get runtime information.
Signed-off-by: Ishan Tyagi <ishantyagi25@gmail.com>
2023-08-11 18:16:34 +05:30
Benjamin Wang
59b8453440
Merge pull request #550 from fyfyrchik/heap-alloc-key
bucket: allow to allocate key on stack in Put()
2023-08-11 08:00:04 +01:00
Evgenii Stratonikov
71a59caf31 bucket: allow to allocate key on stack in Put()
As per `go build -gcflags -m ./... 2>&1`:

Old behaviour:
```
./bucket.go:148:31: leaking param: key
./bucket.go:192:42: leaking param: key
./bucket.go:271:22: leaking param: key
```

Now:
```
./bucket.go:148:31: key does not escape
./bucket.go:192:42: key does not escape
./bucket.go:271:22: key does not escape
```

Signed-off-by: Evgenii Stratonikov <fyfyrchik@runbox.com>
2023-08-10 15:25:28 +03:00
Benjamin Wang
0855b9637f
Merge pull request #532 from ahrtr/create_bucket_if_not_exist_20230627
Improve `CreateBucketIfNotExists` to avoid double searching the same key
2023-08-10 12:29:59 +01:00
Benjamin Wang
af45762eef
Merge pull request #549 from etcd-io/dependabot/go_modules/golang.org/x/sys-0.11.0
build(deps): Bump golang.org/x/sys from 0.10.0 to 0.11.0
2023-08-08 14:14:24 +01:00
dependabot[bot]
2bbf2e9972
build(deps): Bump golang.org/x/sys from 0.10.0 to 0.11.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.10.0 to 0.11.0.
- [Commits](https://github.com/golang/sys/compare/v0.10.0...v0.11.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 14:37:14 +00:00
Benjamin Wang
3ed248c4eb Improve CreateBucketIfNotExists to avoid double searching the same key
Benchmark with this change:
BenchmarkBucket_CreateBucketIfNotExists-10    	     123	   9573035 ns/op	   17930 B/op	      37 allocs/op

Benchmark with old implementnation:
BenchmarkBucket_CreateBucketIfNotExists-10    	     121	  10474415 ns/op	   18147 B/op	      46 allocs/op

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-07 09:54:26 +01:00
Benjamin Wang
b2a3debdd0
Merge pull request #548 from jmhbnz/master
Updated go to latest patch release 1.19.12
2023-08-06 07:40:51 +01:00
James Blair
84572b19e4
Updated go to latest patch release 1.19.12.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-06 08:44:54 +12:00
Benjamin Wang
b7798fd9c1
Merge pull request #547 from johnshajiang/ignore-DS_Store
gitignore: ignore .DS_Store on macOS
2023-08-01 18:01:36 +01:00
John Jiang
51a9dde31e gitignore: ignore .DS_Store on macOS
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-08-02 00:26:37 +08:00
Benjamin Wang
2478f30edc
Merge pull request #540 from ishan16696/doc/bboltCLI
Documentation: added a doc for bbolt command-line.
2023-08-01 10:44:26 +01:00
Ishan Tyagi
81634ce08c Documentation: added a doc for bbolt command-line.
Signed-off-by: Ishan Tyagi <ishantyagi25@gmail.com>
2023-08-01 13:42:11 +05:30
Benjamin Wang
808aac7750
Merge pull request #546 from vianamjr/failpoint-lack-of-disk-space
tests: add failpoint to simulate lack of disk space
2023-07-31 14:42:04 +01:00
Marcondes Viana
5ddbd0c94e tests: add failpoint to simulate lack of disk space
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-07-31 08:23:01 -03:00
Benjamin Wang
d0a911ef40
Merge pull request #545 from ishan16696/openDb/fixfileMode
Open bbolt database with file mode 0600 instead of 0666
2023-07-29 15:49:41 +01:00
Ishan Tyagi
65759b6c75 Fix bbolt command-line commands to open a bbolt database with file mode:0600 instead of 0666.
Fix bbolt command-line command: compact to open a bbolt database with file mode:0400 instead of 0444

Signed-off-by: Ishan Tyagi <ishantyagi25@gmail.com>
2023-07-29 18:35:06 +05:30
Ishan Tyagi
c0b6749ca4 Fix tests to open a bbolt database with file mode:0600 instead of 0666.
Signed-off-by: Ishan Tyagi <ishantyagi25@gmail.com>
2023-07-29 18:06:26 +05:30
Benjamin Wang
39d812baeb
Merge pull request #543 from ishan16696/doc/fixFileMode
Documentation: standardised examples in README.md to use file mode:0600
2023-07-26 07:38:00 +01:00
Ishan Tyagi
7cab6be2ae Documentation: standardised examples in README.md to use file mode:0600
Signed-off-by: Ishan Tyagi <ishantyagi25@gmail.com>
2023-07-26 00:27:38 +05:30
Benjamin Wang
4fab5d4de4
Merge pull request #538 from ishan16696/smallFix
updated bbolt stats help.
2023-07-17 08:26:56 +01:00
Ishan Tyagi
c1a02c4913 updated bbolt stats help.
Signed-off-by: ishan16696 <ishan.tyagi@sap.com>
2023-07-17 09:07:24 +05:30
Benjamin Wang
f697249110
Merge pull request #536 from ahrtr/update_gitignore_20230713
Add binary file /bbolt into .gitignore
2023-07-13 18:48:58 +01:00
Benjamin Wang
df89d0a383 Add binary file /bbolt into .gitignore
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-13 16:33:07 +01:00
Benjamin Wang
cf493340c0
Merge pull request #534 from jmhbnz/master
Updated go to latest patch release 1.19.11
2023-07-13 11:48:36 +01:00
James Blair
e1112bf01a
Updated go to latest patch release 1.19.11.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-07-13 21:14:38 +12:00
Benjamin Wang
324470d9c0
Merge pull request #533 from etcd-io/dependabot/go_modules/golang.org/x/sys-0.10.0
build(deps): Bump golang.org/x/sys from 0.9.0 to 0.10.0
2023-07-11 08:05:34 +01:00
dependabot[bot]
5773a82712
build(deps): Bump golang.org/x/sys from 0.9.0 to 0.10.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/sys/compare/v0.9.0...v0.10.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 14:44:36 +00:00
Benjamin Wang
5532a14347
Merge pull request #503 from cenkalti/filename
Rename aix and solaris os specific files
2023-06-27 21:01:13 +01:00
Benjamin Wang
be462e6f66
Merge pull request #498 from cenkalti/memory
Update Bucket.Get documentation
2023-06-26 17:28:37 +01:00
Benjamin Wang
170af8251e
Merge pull request #528 from etcd-io/dependabot/go_modules/golang.org/x/sync-0.3.0
build(deps): Bump golang.org/x/sync from 0.2.0 to 0.3.0
2023-06-20 09:27:49 +01:00
dependabot[bot]
4ff523cf64
build(deps): Bump golang.org/x/sync from 0.2.0 to 0.3.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.2.0 to 0.3.0.
- [Commits](https://github.com/golang/sync/compare/v0.2.0...v0.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 18:06:54 +00:00
Benjamin Wang
8d9ac76bbe
Merge pull request #527 from etcd-io/dependabot/go_modules/golang.org/x/sys-0.9.0
build(deps): Bump golang.org/x/sys from 0.8.0 to 0.9.0
2023-06-19 19:06:11 +01:00
dependabot[bot]
11a0cdf6a0
build(deps): Bump golang.org/x/sys from 0.8.0 to 0.9.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.8.0 to 0.9.0.
- [Commits](https://github.com/golang/sys/compare/v0.8.0...v0.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 15:01:11 +00:00
Cenk Alti
3f7812656f
Update Bucket.Get documentation
Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2023-06-18 20:27:01 -04:00
Benjamin Wang
8ebdaf8d2c
Merge pull request #516 from ahrtr/filesz_20230526
Remove field `filesz` from DB
2023-06-15 16:23:38 +01:00
Benjamin Wang
e79ff5f73d
Merge pull request #526 from etcd-io/dependabot/github_actions/golangci/golangci-lint-action-3.6.0
build(deps): Bump golangci/golangci-lint-action from 3.5.0 to 3.6.0
2023-06-13 05:34:32 +08:00
dependabot[bot]
df4062a434
build(deps): Bump golangci/golangci-lint-action from 3.5.0 to 3.6.0
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](5f1fec7010...639cd343e1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 15:03:11 +00:00
Benjamin Wang
4be8c63772
Merge pull request #525 from charles-chenzz/update-golang-patch
update go to latest patch release 1.19.10
2023-06-09 08:39:24 +08:00
charles-chenzz
c8cb5273d9 update go to latest patch release 1.19.10
Signed-off-by: charles-chenzz <Rekles666@gmail.com>
2023-06-08 20:06:52 +08:00
Benjamin Wang
0880906068
Merge pull request #523 from etcd-io/dependabot/go_modules/github.com/stretchr/testify-1.8.4
build(deps): Bump github.com/stretchr/testify from 1.8.3 to 1.8.4
2023-06-06 07:43:22 +08:00
Benjamin Wang
4169b81123
Merge pull request #522 from etcd-io/dependabot/github_actions/golangci/golangci-lint-action-3.5.0
build(deps): Bump golangci/golangci-lint-action from 3.4.0 to 3.5.0
2023-06-06 07:42:51 +08:00
dependabot[bot]
1b3c29385a
build(deps): Bump github.com/stretchr/testify from 1.8.3 to 1.8.4
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.3...v1.8.4)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 15:01:26 +00:00
dependabot[bot]
3b3316810d
build(deps): Bump golangci/golangci-lint-action from 3.4.0 to 3.5.0
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](08e2f20817...5f1fec7010)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 15:01:14 +00:00
Benjamin Wang
b31e3ec736
Merge pull request #518 from cenkalti/rebalance
Adjust rebalance threshold with Bucket.FillPercent
2023-05-31 06:03:32 +08:00