Commit Graph

1085 Commits (c19ea9b61308a12d685b137286c152099aca486c)

Author SHA1 Message Date
Andrew Martinez d4a4aebb9a ignore .idea folder, go to 1.15 2020-10-22 10:18:36 -04:00
Andrew Martinez 56f6a30657 fix etcd-io/bbolt#247 move compact logic
- add todo
2020-10-22 10:18:25 -04:00
Tobias Klauser 74e833b572 Use madvise syscall wrapper from golang.org/x/sys/unix
Direct syscalls using syscall.Syscall(SYS_*, ...) should no longer be
used on darwin, see [1]. Instead, use the madvise syscall wrapper
provided by the golang.org/x/sys/unix package for all unix platforms.
This implement the same functionality.

[1] https://golang.org/doc/go1.12#darwin

As suggested by @ptabor in https://github.com/etcd-io/etcd/pull/12316#issuecomment-698193671
2020-09-24 11:58:10 +02:00
adream307 ea42d394b8 remove unreachable code 2020-08-28 11:10:49 +08:00
Cenk Altı f6be823028
Add Rain torrent library to projects section in README (#232) 2020-08-07 13:57:53 -07:00
Hans 64011d1c1e
Ignore IntelliJ/GoLand generated files.
Signed-off-by: Hans <hans@dkmt.io>
2020-07-27 16:07:27 +08:00
Gyuho Lee 232d8fc87f
Merge pull request #220 from jrick/memfix
Fix incorrect unsafe usage
2020-06-15 00:38:12 -07:00
Huahang Liu (Hans) 2232802a2c ignore goland ide generated files
Signed-off-by: Huahang Liu (Hans) <hliu@me.com>
2020-05-25 16:42:04 +08:00
Josh Rickmar 044f3bd014 Test many DBs used concurrently 2020-05-23 16:58:44 +00:00
Josh Rickmar 9034717d69 Try to use reflect.SliceHeader correctly this time 2020-05-21 18:50:41 +00:00
Josh Rickmar 81f25783ae Shorten max array lengths for the data type 2020-05-03 17:32:57 +00:00
Josh Rickmar e04f391ee0 go fmt 2020-04-30 22:26:53 +00:00
Josh Rickmar f0005d4d30 Comment the byte slice conversion 2020-04-30 21:08:15 +00:00
Josh Rickmar f9d3ff6648 Fix incorrect unsafe usage
After checkptr fixes by 2fc6815c, it was discovered that new issues
were hit in production systems, in particular when a single process
opened and updated multiple separate databases.  This indicates that
some bug relating to bad unsafe usage was introduced during this
commit.

This commit combines several attempts at fixing this new issue.  For
example, slices are once again created by slicing an array of "max
allocation" elements, but this time with the cap set to the intended
length.  This operation is espressly permitted according to the Go
wiki, so it should be preferred to type converting a
reflect.SliceHeader.
2020-04-28 20:30:23 +00:00
chyroc a8af23b57f
opt: reuse var leafPageElementSize (#215) 2020-04-23 17:56:04 -07:00
James Ravn 6dc724cf03
Clarify transaction section (#59)
Even nested read-only transactions can cause deadlocks. This is due to golang's RWMutex behaviour.
It doesn't allow readers to acquire a lock if a write lock is pending. It's possible for a child read-only
transaction to block trying to acquire `mmaplock.RLock`, while a writer is trying to acquire
`mmaplock.Lock`. As a result, the parent transaction never releases its read lock on `mmaplock`, and the
application deadlocks.

This wasn't clear to me from the provided docs, which just mentions read/write and read transactions being nested.
2020-04-06 14:46:16 -07:00
Gyuho Lee 68cc10a767
Merge pull request #210 from tmm1/patch-1
Remove unused import to fix arm builds
2020-03-19 13:29:37 -07:00
Aman Gupta 52871c4623
Remove unused import to fix arm builds 2020-03-19 12:15:01 -07:00
Gyuho Lee 4d27a42422
Merge pull request #206 from lzhfromustc/4_Fatal_misusages
Fix the misusage of t.Fatal() in 4 test functions
2020-03-19 11:27:51 -07:00
Gyuho Lee a74531a954
Merge pull request #209 from d2r2/d2r2-fix-unexpected-delete-bucket-error
Fix unexpected delete bucket error: "delete bucket: incompatible value"
2020-03-19 11:27:32 -07:00
Gyuho Lee 2fc6815ca0
Merge pull request #201 from jrick/checkptr
Fix unsafe pointer conversions caught by Go 1.14 checkptr
2020-03-19 11:26:25 -07:00
Josh Rickmar 543c40ab41 Fix unsafe pointer conversions caught by Go 1.14 checkptr 2020-03-18 21:18:39 -04:00
Denis Dyakov c41b6f7c53 Fix unexpected delete bucket error 2020-03-13 23:40:49 +06:00
Ziheng Liu 59e65f9618 Fix the misusage of t.Fatal() in 4 test functions 2020-03-03 23:00:28 -05:00
Nicolas Lepage da442c51f1 Add github.com/philippgille/gokv in the list of Projects Using Bolt (#200) 2020-01-21 09:05:14 -08:00
Ryan Wise 126e837046 fix panic on install on unix systems (#198) 2020-01-06 12:31:24 -08:00
Steve Gore 0b7b41e21b Simple grammar fix (#191) 2019-11-28 15:57:01 -08:00
Justin Kolberg 7f8bb47fca Add support for aix (#189)
* add support for aix

Signed-off-by: Justin Kolberg <amd.prophet@gmail.com>

* rename bolt_aix.go to bolt_unix_aix.go

Signed-off-by: Justin Kolberg <amd.prophet@gmail.com>

* use go 1.12

Signed-off-by: Justin Kolberg <amd.prophet@gmail.com>
2019-11-22 12:31:57 -08:00
Gyuho Lee 96e95490d9
Merge pull request #176 from alrs/fix-test-goroutines
Fix Swallowed goroutine Error Statements
2019-11-20 13:18:12 -08:00
AbserAri 6e135e5d7e DB.CreateBucket() -> Tx.CreateBucket() (#178)
there is not a method for DB called CreateBucket()
2019-10-01 09:49:32 -07:00
bbiao 72c1660c13 In golang v1.13, parse flags in package initialization will fail. See https://tip.golang.org/doc/go1.13#testing (#177)
Fixed by move the init func into a TestMain func.
2019-09-25 22:49:19 +08:00
Lars Lehtonen 0e02572955 simulation_test.go: fix swallowed goroutine error statements
simulation_test.go: add logging
2019-09-17 19:11:49 +00:00
Gyuho Lee 14ae4453e2
Merge pull request #157 from twpayne/add-go-mod
add go.mod
2019-09-08 20:39:40 -07:00
Ning Xie 35b6661093 enhance ut (#172) 2019-08-08 21:43:56 -07:00
Gyuho Lee 62396cbb20
Merge pull request #171 from muesli/conversion-fixes
Avoid unnecessary conversions
2019-08-06 11:18:37 -07: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
Marin Atanasov Nikolov 0362320deb db.Path() resolves to db.file.Name() (#168) 2019-07-01 09:46:51 -07:00
Derek Collison 7c53bc0328 Added NATS and NATS Streaming (#164) 2019-06-28 01:08:48 +08:00
Xingyu Chen a0458a2b35 fix rollback panic bug (#153) 2019-06-08 09:57:04 -07:00
Jeff R. Allen 2eb7227ade Fix the build on Go 1.10 and before (#161)
Fixes #160.
2019-05-28 13:21:53 -07:00
Marco Peereboom 1727806877 Add support for riscv64 arch. (#159)
All tests pass.
2019-05-28 01:25:52 +02:00
Tom Payne 4af6cfab70 add OpenFile option (#158) 2019-05-10 14:16:40 -07:00
Tom Payne e65d4d5d27 add go.mod 2019-05-09 20:03:52 -07:00
Iskander (Alex) Sharipov 63597a96ec remove excessive []byte(s) conversion (#143)
`copy` permits using to mix `[]byte` and `string` arguments without
explicit conversion. I removed explicit conversion to make the code simpler.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2019-01-28 10:11:30 -08:00
Xingyu Chen 8693da9f4d use segregated hashmap to boost the freelist allocate and release performance (#141) 2019-01-25 10:30:05 -08:00
Xingyu Chen 26245f2a4c fix test in releaserange (#142) 2019-01-23 18:34:41 -08:00
Xingyu Chen f0ad07c7d4 add getFreePageIDs (#140) 2019-01-20 23:42:17 -08:00
Xingyu Chen c5638469ec update the freelist readIDs (#139) 2019-01-20 21:45:53 -08:00
Ross Spencer 22d122a8b9 Add kval-access-language to README.md (#133) 2018-12-07 17:02:42 -08:00
John Howard 7ee3ded59d Fix Windows flock/funlock race (#122)
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-09-12 13:56:54 -07:00