mirror of
https://github.com/nspcc-dev/neofs-node.git
synced 2026-03-01 04:29:10 +00:00
Failed to open LOCODE db in Windows #372
Labels
No labels
I1
I2
I3
I4
S0
S1
S2
S3
S4
U0
U1
U2
U3
U4
blocked
bug
config
dependencies
discussion
documentation
enhancement
enhancement
epic
feature
go
good first issue
help wanted
neofs-adm
neofs-cli
neofs-cli
neofs-cli
neofs-ir
neofs-lens
neofs-storage
neofs-storage
performance
question
security
task
test
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-node#372
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cthulhu-rider on GitHub (Dec 1, 2021).
I attempted to run inner ring node on windows.
Current Behavior
Run fails with error
Possible solutions
There is an assumption that the size of the db affects. The solution can lie either in the OS settings or in the parameters for opening the database.
Your Environment
defaultuname -a):Microsoft Windows [Version 10.0.22000.318]@fyrchik commented on GitHub (Dec 27, 2021):
I think the problem lies here https://github.com/etcd-io/bbolt/blob/master/bolt_windows.go#L73
Mapping size calculated by bolt can be bigger than file size (rounding up to the nearest power of 2 is performed). While linux allows such things, windows tries to expand the file if it's size is less then the size of the mapping https://docs.microsoft.com/en-us/windows/win32/memory/creating-a-file-mapping-object . We get an error because PAGE_READONLY flag is provided and file is NOT truncated to the needed size 6 lines earlier if
ReadOnly: trueis provided in bolt options.Besides fixing things in bolt (providing 0 instead of size fixed this particular case but could introduce some bugs) we can:
readonly.readonlyflag.I also think that
LOCODE_DBfile created withneofs-cliand published in our repo could do such thing automatically.@fyrchik commented on GitHub (Dec 28, 2021):
See https://github.com/etcd-io/bbolt/issues/252 for a similar (?) issue.
@roman-khimov commented on GitHub (Apr 21, 2023):
Should be fixed by bolt 1.3.7.