Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Godoc with example usage of carv2 primary flows #124

Closed
3 of 4 tasks
willscott opened this issue Jun 29, 2021 · 2 comments
Closed
3 of 4 tasks

Godoc with example usage of carv2 primary flows #124

willscott opened this issue Jun 29, 2021 · 2 comments
Milestone

Comments

@willscott
Copy link
Member

willscott commented Jun 29, 2021

There should be useful documentation and examples guiding users through

  • an import/export roundtrip
  • Opening an unknown file as a blockstore
  • writing data to a carv2 via blockstore interface and saving it.
  • Top level doc todo
@willscott willscott added this to the CAR v2 milestone Jun 29, 2021
masih added a commit that referenced this issue Jul 16, 2021
Implement examples that show how to open a read-only blockstore, and a
read-write blockstore along with resumption from the same file.

Fixes:
- #124
masih added a commit that referenced this issue Jul 16, 2021
Implement examples that show how to open a read-only blockstore, and a
read-write blockstore along with resumption from the same file.

Fixes:
- #124
masih added a commit that referenced this issue Jul 16, 2021
Implement examples that show how to open a read-only blockstore, and a
read-write blockstore along with resumption from the same file.

Fixes:
- #124
masih added a commit that referenced this issue Jul 16, 2021
Implement examples that show how to open a read-only blockstore, and a
read-write blockstore along with resumption from the same file.

Fixes:
- #124
masih added a commit that referenced this issue Jul 16, 2021
Implement examples that show how to open a read-only blockstore, and a
read-write blockstore along with resumption from the same file.

The example surfaced a race condition where if the `AllKeysChan` is
partially consumed and file is closed then the gorutie started by chan
population causes the race condition. Locking on Close will make the
closure hang. Better solution is needed but choices are limited due to
`AllKeysChan` signature.

Fixes:
- #124
masih added a commit that referenced this issue Jul 16, 2021
Implement examples that show how to open a read-only blockstore, and a
read-write blockstore along with resumption from the same file.

The example surfaced a race condition where if the `AllKeysChan` is
partially consumed and file is closed then the gorutie started by chan
population causes the race condition. Locking on Close will make the
closure hang. Better solution is needed but choices are limited due to
`AllKeysChan` signature.

Fixes:
- #124
@willscott
Copy link
Member Author

make sure also to fix the todo in top level godoc:
https://github.com/ipld/go-car/blob/master/v2/doc.go#L2

@mvdan
Copy link
Contributor

mvdan commented Jul 16, 2021

Yep! I actually noticed this just minutes before you wrote this comment, too, as I was looking at the pkgsite links I shared :)

@masih masih closed this as completed in 61cfb4d Aug 4, 2021
Jorropo pushed a commit to ipfs/boxo that referenced this issue Mar 22, 2023
Implement examples that show how to open a read-only blockstore, and a
read-write blockstore along with resumption from the same file.

The example surfaced a race condition where if the `AllKeysChan` is
partially consumed and file is closed then the gorutie started by chan
population causes the race condition. Locking on Close will make the
closure hang. Better solution is needed but choices are limited due to
`AllKeysChan` signature.

Fixes:
- ipld/go-car#124


This commit was moved from ipld/go-car@ae4ddd4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants