1205 Commits

Author SHA1 Message Date
Benjamin Wang
1273ac779e
Merge pull request #412 from etcd-io/dependabot/go_modules/github.com/stretchr/testify-1.8.2
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2
2023-02-28 06:25:18 +08:00
dependabot[bot]
2e25261ce0
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.1...v1.8.2)

---
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-02-27 15:12:40 +00:00
Marek Siarkowicz
eb39e4c93e Fix redacted format
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-20 06:37:36 +08:00
Benjamin Wang
578b94665b update the usage of surgery command
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-18 04:43:20 +08:00
dependabot[bot]
340246337c Bump golang.org/x/sys from 0.4.0 to 0.5.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/compare/v0.4.0...v0.5.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-02-14 06:24:30 +08:00
Josh Rickmar
46437cea06 Avoid syscall.Syscall use on OpenBSD
Syscall numbers are not stable on OpenBSD, and hardcoding the msync
syscall number will break bbolt on future versions of OpenBSD.  Use
the libc wrapper provided by golang.org/x/sys/unix instead.

Signed-off-by: Josh Rickmar <jrick@zettaport.com>
2023-02-12 05:47:49 +08:00
caojiamingalan
505fc0f7af complete all cleanup operations in db.close() even if there is an error in the middle
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-02-11 07:21:13 +08:00
missinglink
287049ea83 compact: add cli flags to enable NoSync option
Signed-off-by: missinglink <insomnia@rcpt.at>
2023-02-02 12:16:15 +08:00
Benjamin Wang
8f4a7e1f92 update the relate date of v1.3.7
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-31 05:27:19 +08:00
Benjamin Wang
fc361799ce added summary on the changes in v1.3.7
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-29 20:51:54 +08:00
Benjamin Wang
1651561091 Update changelog-1.3 to prepare for v1.3.7 release
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-29 20:51:54 +08:00
Benjamin Wang
35c4569bf9 revert the signature of tx.Check and add tx.CheckWithStringer
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-29 19:53:07 +08:00
dependabot[bot]
afa8b89da8 Bump golangci/golangci-lint-action from 3.3.1 to 3.4.0
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](0ad9a0988b...08e2f20817)

---
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-01-29 10:58:20 +08:00
dependabot[bot]
046c7b9e5b Bump golang.org/x/sys from 0.3.0 to 0.4.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/compare/v0.3.0...v0.4.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-01-29 10:50:50 +08:00
Marek Siarkowicz
613ea3dffa Add support for using sha256 sum for obfuscating values
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-28 07:08:58 +08:00
Benjamin Wang
6ee9f1d9a7
Merge pull request #389 from ahrtr/surgery_write_empty_page_20230120
Add `surgery clear-page` command
2023-01-21 07:09:25 +08:00
Benjamin Wang
834868d65d add 'surgery clear-page' command
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-20 18:46:07 +08:00
Piotr Tabor
774edab623
Merge pull request #387 from uvletter/fix_grow
fix db.grow is unusable when NoFreelistSync is on
2023-01-19 19:21:15 +01:00
luv
460b77759e fix db.grow is unusable when NoFreelistSync is on
Signed-off-by: tian <skylypig@gmail.com>
2023-01-19 22:33:51 +08:00
Benjamin Wang
f9051642f7
Merge pull request #383 from ahrtr/failpoint_20230113
Support injecting failpoints to mimic syscall errors
2023-01-19 19:43:10 +08:00
Benjamin Wang
1508097501
Merge pull request #388 from ahrtr/surgery_copy_page_20230118
Add `bbolt surgery copy-page` command
2023-01-19 19:07:05 +08:00
Benjamin Wang
d89daae9d5 add 'surgery copy-page' command
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-18 08:40:57 +08:00
Benjamin Wang
8c794d23aa
Merge pull request #386 from ahrtr/unexport_cmds_20230117
unexport all bbolt command structs
2023-01-18 08:12:53 +08:00
Benjamin Wang
645d5e9ea9 unexport all bbolt command structs
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-17 15:07:15 +08:00
Benjamin Wang
f10bad3c8f support injecting failpoints and add failpoint github workflow
Implemented first demo "TestFailpoint_MapFail"

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-16 20:32:16 +08:00
Benjamin Wang
6652d8269e
Merge pull request #385 from ahrtr/add_surgery_revert_meta_page_20230116
Add `bbolt surgery revert-meta-page` command
2023-01-16 20:30:24 +08:00
Benjamin Wang
ff467f2ff5 addresed review comments
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-16 19:08:53 +08:00
Benjamin Wang
8df4afc24b add 'bbolt surgery revert-meta-page' command
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-16 18:32:41 +08:00
Benjamin Wang
da3f312335
Merge pull request #384 from ahrtr/base_command_20230116
move all common fields into baseCommand
2023-01-16 18:23:17 +08:00
Benjamin Wang
376af859cb move all common fields into baseCommand
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-16 14:58:01 +08:00
Piotr Tabor
51370e425a
Merge pull request #225 from ptabor/extend_checker2
Recursive checker implementation.
2023-01-14 12:03:10 +01:00
Piotr Tabor
eb0deb9550 Refactor common code within key-order checker.
Signed-off-by: Piotr Tabor <ptab@google.com>
2023-01-13 19:14:45 +01:00
Piotr Tabor
80edaf14f0 Rename: pgid pgid => pgId pgid to avoid confusion.
Signed-off-by: Piotr Tabor <ptab@google.com>
2023-01-13 19:14:45 +01:00
Piotr Tabor
f16e2522ce Address review comments.
Signed-off-by: Piotr Tabor <ptab@google.com>
2023-01-13 19:14:45 +01:00
Piotr Tabor
ee27a544ca Recursive checker: Final touches.
Signed-off-by: Piotr Tabor <ptab@google.com>
2023-01-13 19:14:45 +01:00
Piotr Tabor
710c33fe89 Tests for recursive checker (working on a corrupted files).
Signed-off-by: Piotr Tabor <ptab@google.com>
2023-01-13 19:14:45 +01:00
Piotr Tabor
0c8d75db1e Recursive checker implementation.
Recursive checker confirms database consistency with respect to b-tree
key order constraints:
  - keys on pages must be sorted
  - keys on children pages are between 2 consecutive keys on parent
branch page).

Signed-off-by: Piotr Tabor <ptab@google.com>
2023-01-13 19:14:45 +01:00
Piotr Tabor
0ccb16dc02 Mechanical move of Check functions to tx_check.go file.
Signed-off-by: Piotr Tabor <ptab@google.com>
2023-01-13 19:14:45 +01:00
Benjamin Wang
ece0e3dec2
Merge pull request #362 from ahrtr/protect_rollback_20221221
Add protection when `mmap` somehow fails
2023-01-13 06:45:07 +08:00
Benjamin Wang
eabffad75a add protection when mmap somehow fails
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-12 07:58:02 +08:00
Benjamin Wang
63d0cb428d cleanup data and dataaz when unmapping db on Windows platform
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-12 07:17:08 +08:00
Benjamin Wang
ad85400db2
Merge pull request #381 from ahrtr/loadfreepage_20230111
add PreLoadFreelist to support loading free pages in readonly mode
2023-01-11 19:49:35 +08:00
Benjamin Wang
d2fae80500 add protection on (*Tx)Page method in case free pages are not preloaded
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-11 18:39:32 +08:00
Benjamin Wang
06c66acf48 add test case TestOpenWithPreLoadFreelist
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-11 18:10:12 +08:00
Benjamin Wang
6bc57389f0 add PreLoadFreelist to support loading free pages in readonly mode
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-11 18:10:12 +08:00
Piotr Tabor
51c763c4e9
Merge pull request #377 from ahrtr/update_gitignore_20230109
add /cmd/bbolt/bbolt into .gitignore
2023-01-11 10:13:11 +01:00
Piotr Tabor
90a882e711
Merge pull request #379 from ahrtr/dependabot_20230111
security: add dependabot.yml
2023-01-11 10:12:26 +01:00
Benjamin Wang
df7540e2f4 security: add dependabot.yml
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-11 06:00:23 +08:00
Benjamin Wang
3037d91410 add /cmd/bbolt/bbolt into .gitignore
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-09 12:59:07 +08:00
Benjamin Wang
ff5cb3fe59
Merge pull request #375 from fuweid/213-follow-up
#373 Follow-up
2023-01-05 16:56:57 +08:00