Skip to content

Error writing to datastore on Windows 10 #7115

@hsn10

Description

@hsn10

Version information:

0.5 rc1

Description:

New flatfs datastore version introduced in 0.5 has problems with writing blocks on Windows 10.

2020-04-07T16:46:32.917+0200    �[31mERROR�[0m  bitswap go-bitswap@v0.2.8/bitswap.go:342
Error writing 3 blocks to datastore: 
  rename C:\tmp\ipfs2\blocks\.temp\temp-043813542
 C:\tmp\ipfs2\blocks\AJ\CIQCCVMFRWGRR2S7OUU7F3JWGSYDBLXX7SJKXT343KSIH2XRLPM3AJI.data: Access is denied.
github.com/ipfs/go-bitswap.(*Bitswap).receiveBlocksFrom
        pkg/mod/github.com/ipfs/go-bitswap@v0.2.8/bitswap.go:342
github.com/ipfs/go-bitswap.(*Bitswap).ReceiveMessage
        pkg/mod/github.com/ipfs/go-bitswap@v0.2.8/bitswap.go:419
github.com/ipfs/go-bitswap/network.(*impl).handleNewStream
        pkg/mod/github.com/ipfs/go-bitswap@v0.2.8/network/ipfs_impl.go:271
github.com/libp2p/go-libp2p/p2p/host/basic.(*BasicHost).SetStreamHandler.func1
        pkg/mod/github.com/libp2p/go-libp2p@v0.7.4/p2p/host/basic/basic_host.go:417

There is a very large number of temp-* files in blocks\.temp directory which means that this error happens quite often. It does not fail writing for all blocks, some blocks are written correctly. My guess is that file has to be closed first before it can be renamed on windows platform.

Metadata

Metadata

Assignees

Labels

kind/bugA bug in existing code (including security flaws)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions