Peter Johnson
Peter Johnson
Okay I'll look into drafting a PR, it will need a bit of discussion about the specifics but I believe the use of `MAP_ANONYMOUS` will make the feature pretty much...
I had another look at this today and made some progress with a new interface called `Backing`. The concrete implementations of can be one of either `FileBacking` or `MemoryBacking`. These...
```go type backing interface { Fd() int Fsync() error Truncate(int64) error Sync() error Flock(bool, time.Duration) error File() *os.File Open(string, os.FileMode, *Options) error Close() error ShouldInit() (bool, error) } type memoryBacking...
> Well, one of the use-cases in-memory storage are unit tests. For them we would probably not need any syscall... Yeah that's true, but people familiar with the mmap syscall...
> Another concern here would be - is it actually cross-platform? Will it run on Windows in your proposal? Yes, the Windows equivalent of [mmap](https://man7.org/linux/man-pages/man2/mmap.2.html) is called [MapViewOfFile](https://docs.microsoft.com/en-gb/windows/win32/api/memoryapi/nf-memoryapi-mapviewoffile?redirectedfrom=MSDN) and has...
Agh I see, there's two different approaches here. I think you're talking about providing a storage adapter pattern which would allow persistence to abitrary 'file-like-things' What I'm talking about is...
I found this commit which seems to implement exactly this functionality: https://github.com/boltdb/bolt/commit/ed31a3bd0058b926bb17cae9293a8af6e6f1c066
I can confirm this is still broken on `master`, it makes the database completely unusable for any find-and-delete operations.
Okay, so hacking around a bit, there is a workaround if you rewrite the range query from the example as such: ```go for k, _ := cursor.Seek(min); k != nil...
This might be easy enough to achieve within [package.json](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#os), although fsevents seem to have done [something different](https://github.com/fsevents/fsevents/commit/ca07cfdb534f6f85a4a918bc99ef414d191275dc).