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

feat: TxnDatastore namespace and keytransform wrappers #210

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

i-norden
Copy link

@i-norden i-norden commented Oct 17, 2023

This PR introduces namespace and keytransform wrappers for the go-datastore TxnDatastore. This is in order to support a GetMany boxo blockstore implementation that leverages the TxnDatastore for batched reads which, in turn, is ultimately for supporting parallel traversal methods in go-hamt-ipld and go-amt-ipld.

boxo/blockstore PR that uses this: ipfs/boxo#492

@welcome
Copy link

welcome bot commented Oct 17, 2023

Thank you for submitting this PR!
A maintainer will be here shortly to review it.
We are super grateful, but we are also overloaded! Help us by making sure that:

  • The context for this PR is clear, with relevant discussion, decisions
    and stakeholders linked/mentioned.

  • Your contribution itself is clear (code comments, self-review for the
    rest) and in its best form. Follow the code contribution
    guidelines

    if they apply.

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
Next steps:

  • A maintainer will triage and assign priority to this PR, commenting on
    any missing things and potentially assigning a reviewer for high
    priority items.

  • The PR gets reviews, discussed and approvals as needed.

  • The PR is merged by maintainers when it has been approved and comments addressed.

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution.
We are very grateful for your contribution!

keytransform/txndatastore.go Outdated Show resolved Hide resolved
@hsanjuan
Copy link
Contributor

@i-norden I don't see much has changed since last time?

@i-norden
Copy link
Author

@i-norden I don't see much has changed since last time?

Ah apologies, I embedded but with a named field instead of anonymously so it still had the methods reimplemented but only to fall directly through. Fixed now!

@i-norden
Copy link
Author

Also embedded ds.Txn into txWrapper, but since most the methods need to apply ConvertKey() the only ones this saved us from reimplementing are Commit() and Discard()

@hsanjuan
Copy link
Contributor

@i-norden I'm not going to have much time in the next few days, but have a look to #211. I think it does what you want. You don't need to re-implement anything, you just need to wrap stuff in other stuff. If I haven't done something completely wrong, just take that, improving the naming of things and test it a bit.

@i-norden
Copy link
Author

Thanks @hsanjuan! I appreciate the feedback. I'll take a look and test out that wrapper.

@lidel
Copy link
Member

lidel commented Apr 16, 2024

@i-norden is this PR still necessary or were you able to solve it with mentioned wrapper?

@gammazero gammazero marked this pull request as draft August 20, 2024 16:49
@gammazero gammazero added the need/community-input Needs input from the wider community label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/community-input Needs input from the wider community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants