Provide Query Paramater to avoid copying Value's data?

Open
#59 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
databases

Research direction

Start with the datastore query API around NextSync(), Next(), and Process(), then review the linked go-libp2p-kad-dht issue for the copying concern. Clarify the parameter's behavior and error cases, especially forbidding Next() and Process() when it is enabled. Done means the query behavior and those invalid calls are covered by tests.

Written by the indexing model from the issue text.

Description

status/deferred

When NextSync() is used it is safe to avoid copying the Value's data. This will help mostly with go-ds-leveldb queries see https://github.com/libp2p/go-libp2p-kad-dht/issues/39.

@whyrusleeping Do you think this is a good idea? If this paramater is provided it will be an error to call either the Next() or Process() methods on the results.

Dominant language
Go
Stars
248
Forks
68
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ipfs/go-datastore

All issues in ipfs/go-datastore

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.