ipfs / ipfs/go-ipld-format

Batch is not thread safe

Open
#47 2 comments 0 reactions 0 assignees View on GitHub
help wanted kind/enhancement
Dominant language
Go
Stars
65
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Looking at batch code, it using an `activeCommits int` and `size int` counters very liberally all over the place. Calling Add(), at the same time as `Commit()` seems likely to trigger weird side effects: i.e. size reset to 0 when it should not, or `activeCommits` potentially going on the negative.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.