ipfs / ipfs/kubo

Make the Node methods on ProtoNode thread-safe

Open
#3,991 4 comments 1 reaction 0 assignees View on GitHub
status/deferred
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

It's reasonable to expect that structures conforming to the `Node` interface are thread safe. However, `ProtoNode` currently lazily encodes and computes its CID without synchronization. We should be using `sync.Once`.

See the discussion here https://github.com/ipfs/go-ipld-cbor/pull/12

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.