Benjamin Wang
329eba7818
Open db file in readonly mode for commands which shouldn't update db file
...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-27 12:58:32 +08:00
Piotr Tabor
577a4d99b9
bbolt page supports --all and --value-format=redacted formats.
...
--all - prints all pages (only skips pages that were considered successful overflow pages)
--value-format=redacted just prints a length of the value, to reduce length and protect privacy.
The auto & redacted formats are supported in all tools that accept '--format'.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-22 09:56:16 +01:00
Piotr Tabor
cc771afa1e
Move page command to a separate file. It's already a huge file of tools.
...
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-19 00:42:54 +01:00
Piotr Tabor
bad964e850
Merge pull request #354 from ptabor/20221214-fix-bbolt-safety
...
Add safeguards to bbolt CLI tool
2022-12-18 13:17:08 +01:00
Piotr Tabor
c34493c3d1
Safety check to 'bbolt page' command.
...
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-17 14:43:12 +01:00
Piotr Tabor
4acf9d93a5
Fixing golangci warnings.
...
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-16 16:08:56 +01:00
Piotr Tabor
5495c633ad
bbolt get support --parseFormat and --format flags.
...
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-07 22:36:11 +01:00
Piotr Tabor
ed3e67c69b
writelnBytes method has cleaner contract
...
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-07 22:36:11 +01:00
Piotr Tabor
b9199f476d
Add support for --format flag for 'bbolt keys' command.
...
This allows to print keys as 'hex', especially useful in context of etcd revisions:
./bbolt keys --format=hex ./foo/db key
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-07 22:36:11 +01:00
missinglink
e7e1f0c05a
cmd/bbolt: re-enable "bbolt" testing
...
Signed-off-by: missinglink <insomnia@rcpt.at>
2022-11-30 11:20:27 +01:00
Manuel Rüger
33c86c78ca
.github: Enable lint
...
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-10-20 22:47:35 +02:00
Holger Bartnick
fd5535f71f
support sub buckets in get+keys ( #295 )
...
add possibility to get keys and values of sub buckets
2022-02-25 20:50:46 -08:00
Benjamin
d5db64bdbf
upgrade golang to 1.17 and replace iouitl with io and os ( #297 )
2022-01-29 19:28:06 -08:00
Peter Johnson
9b8a60db84
compact: open src file readonly ( #292 )
2022-01-28 18:37:59 -08:00
qingyunha
d043936a71
cmd/bbolt: pagesCommand no need db.Update ( #226 )
...
Co-authored-by: Tao Qingyun <taoqy@ls-a.me>
2021-04-23 17:41:42 -07:00
Michael Hendricks
615d5f6d3f
Replace bolt with bbolt in command line usage ( #235 )
...
The bbolt command line tool was renamed after the fork, but its usage output still used the old name.
2021-04-23 17:41:22 -07:00
Andrew Martinez
56f6a30657
fix etcd-io/bbolt#247 move compact logic
...
- add todo
2020-10-22 10:18:25 -04:00
Christian Muehlhaeuser
0bf4edcf32
Avoid unnecessary conversions
...
No need to convert here, they are already of the right type.
2019-08-06 17:35:28 +00:00
Gyuho Lee
b951856120
cmd/bbolt: disable "bbolt" testing for now
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 08:48:31 -07:00
Gyuho Lee
76a4670663
*: update import paths "go.etcd.io/bbolt"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 08:15:54 -07:00
Gyuho Lee
8c8b786149
cmd/bolt: update import paths
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-27 19:24:48 -07:00
Joe Betz
69918b9e4e
Fix bolt CLI tool print entire freelist, and to dump keys/value bytes of leaf elements.
2017-09-20 12:08:57 -07:00
Gyu-Ho Lee
c3092301af
*: go vet fixes
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-11 13:47:10 -07:00
Lewis Marshall
0ca39ebe25
Add "buckets", "keys" and "get" CLI commands
...
These were previously removed but I find them quite useful so have
reintroduced them.
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-08-11 11:13:11 -07:00
Lewis Marshall
f07641f90a
Add "dump" and "page" commands to CLI usage
...
Signed-off-by: Lewis Marshall <lewis@lmars.net>
2017-08-11 11:12:22 -07:00
Anthony Romano
533739c662
Merge pull request #17 from heyitsanthony/fix543
...
Fix issue #543 'bolt bench crashes'
2017-08-11 10:43:53 -07:00
Anthony Romano
c5d7f33536
Merge pull request #22 from heyitsanthony/fill-compact
...
Set FillPercent=1.0 in 'bolt compact'.
2017-08-11 10:05:38 -07:00
dogben
ef8e711cfb
Set FillPercent=1.0 in 'bolt compact'.
...
By default, pages are split when they reach half full. For 'bolt compact' we want to fill the entire page for maximum compaction.
2017-08-10 22:58:57 -07:00
Anthony Romano
32c9f9e929
pass unused
2017-08-10 22:07:25 -07:00
Anthony Romano
e5514a24a6
pass gosimple
2017-08-10 22:07:25 -07:00
Christian Mauduit
319a33c534
Fix issue #543 'bolt bench crashes'
...
Added a test to check that bucket is actually non-nil before getting a
cursor on it. This happens when querying non-bucket entries, the
Bucket() method does not return explicit errors, so we can guess it's
probably because it's a key of the wrong type (ie: not leaf). No clear
idea wether the results in the case described '-read-mode=seq
-write-mode=rnd-nest' really do make sense, it looks like read are
zero whatsoever.
2017-08-10 21:14:06 -07:00
Gyu-Ho Lee
a30394a020
*: update git paths to 'coreos/bbolt'
2017-07-27 14:58:03 -07:00
Xiang
78b54a42e1
*: use coreos/bbolt as import path
2017-06-20 11:03:31 -07:00
Sebastian
4660afd75e
hexidecimal -> hexadecimal
...
Small spelling fix :)
2017-01-28 10:26:39 +01:00
Ben Johnson
e72f08ddb5
Merge pull request #561 from zhujun2006/master
...
task#560 print leaf k/v with right value
2016-09-06 14:09:29 -06:00
Ben Johnson
f5d275b537
Minor bolt compact revisions
2016-09-05 15:43:02 -06:00
Ben Johnson
52d0f5e6a9
Merge branch 'compact-db' of https://github.com/vincent-petithory/bolt into vincent-petithory-compact-db
2016-09-01 14:47:06 -06:00
stone1342006
60fbb2c9fa
task#560 print leaf k/v with right value
2016-05-18 22:56:05 +08:00
Rodolfo Carvalho
10b100fe0f
Fix bolt stats
output
2015-12-05 19:56:31 +01:00
Vincent Petithory
3279c88f26
compact: allow splitting transactions for large datasets
2015-11-19 19:18:07 +01:00
Vincent Petithory
575904ae85
cli: add compact command
...
compact rewrites a bolt db, recursively walking its keys
in byte order.
2015-11-19 19:18:07 +01:00
Artyom Pervukhin
8547e9ef2f
Fix invalid fmt.Fprintln/Errorf calls
...
`go vet` discovered two calls of Fprintln with trailing newline and one
Errorf call without proper format string.
2015-08-11 11:35:43 +03:00
Xiang Li
71f28eaecb
cmd/bolt: remove duplicate blockProfile flag
2015-04-22 21:37:22 -07:00
Ben Johnson
73a3aa1ccc
Add 'bolt page' command.
2015-04-17 13:28:32 -06:00
Ben Johnson
3ad30436da
Add 'bolt dump' command.
2015-04-16 11:13:34 -06:00
Ben Johnson
dd542876fa
Add improved CLI documentation.
2015-04-15 15:21:50 -06:00
Ben Johnson
d0e8a99e30
Refactor bolt CLI.
2015-04-14 16:32:20 -06:00
Ben Johnson
3b449559cf
Add --path to bolt bench.
2015-04-12 09:36:45 -06:00
Baiju Muthukadan
4ff9f866c5
new line after page size info print
2015-02-28 09:01:57 +05:30
Ben Johnson
ea7ace2f62
Remove 'import' and 'export' CLI commands.
...
The import and export commands are a relic of early Bolt when the file
format was not stable. If the file format changed then users could export
their old data and import it into a new database with a new format.
The Bolt DB file format is stable and will not change so this command is no
longer needed.
Thanks to Alejandro Gaviria for pointing this out.
2015-01-08 15:03:55 -07:00