Comments (7)
It looks like this patch (my mistake) locked the wrong file descriptor.
Before the patch the file descriptor used was based on db.lockfile
:
err := lockFileEx(syscall.Handle(db.lockfile.Fd()), flag, 0, 1, 0, &syscall.Overlapped{})
The patch factored it out of the loop, but based on db.file
:
fd := db.file.Fd() ... err := lockFileEx(syscall.Handle(fd), flag, 0, 1, 0, &syscall.Overlapped{})
The file vs. lockfile subtlety seems to exist only on Windows, as the db
struct definition tells.
I could happily patch it but I don't have anymore (and won't have for the coming months) a Windows platform to test it. But if you have one, let me know and we can do it together.
from bbolt.
I just modified bolt_windows.go at line 65, change fd := db.file.Fd()
to fd := f.Fd()
and it seems fixed @rgeronimi
from bbolt.
LGTM
from bbolt.
can you send a patch to fix this?
from bbolt.
@rgeronimi @xiang90 I have just create a pr #64
from bbolt.
fixed by #64
from bbolt.
Thks
from bbolt.
Related Issues (20)
- A Love Letter HOT 1
- Hash integrity HOT 2
- `bbolt` CLI util panics / shows not-user-friendly errors in certain cases with incorrect (number of) arguments HOT 3
- tx.Commit() - function not implemented HOT 6
- Incremental etcd defrag HOT 6
- Update the document for the known data corruption issue caused by fast commit feature HOT 2
- Plan to release bbolt 1.3.9 HOT 1
- forced power off (Hyper-V/VMware Workstation) creates page cycle HOT 21
- Panic happens when opening a boltdb HOT 2
- Nil pointer dereference in bbolt 1.4.0-alpha.0 detected by robustness tests HOT 3
- Dramatic drop in sequential read performance in main compared to tag v1.3.8 HOT 41
- Can not distinguish between "does not exist" and "has no value" HOT 5
- Use cobra ExactArgs
- Rename cobra commands
- Cursor.Prev() out of range issue v1.3.9 HOT 4
- Add check-page sub command HOT 1
- Introduce benchmarking for PRs HOT 6
- Plan to release v1.3.10 HOT 5
- Race tests timing out trying to run on user forks
- Extend the maintainers of bbolt HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bbolt.