Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Add test to maintain Put contract of calling Has first #47

Merged
merged 1 commit into from
Feb 25, 2020

Conversation

shazow
Copy link
Contributor

@shazow shazow commented Feb 24, 2020

Hi there, I'm working with @MichaelMure on some of Infura's IPFS backend, and we realized that we're relying on the implementation detail of blockstore that Put checks Has first. I want to add a test to maintain this implementation detail, or at least inform us if it's going to go away so we can prepare for it.

@shazow shazow marked this pull request as ready for review February 24, 2020 21:31
@Stebalien
Copy link
Member

While it's an important optimization, it's not a part of the contract. Is it not possible to fix your datastore?

@MichaelMure
Copy link
Contributor

We could, but at a non-trivial performance cost: (local call potentially cached) vs (local call potentially cached) + (remote call)

Not asking for this behavior to be part of the contract, just to be notified if it ever change.

@Stebalien
Copy link
Member

Fair enough.

@Stebalien Stebalien merged commit 6486d67 into ipfs:master Feb 25, 2020
@Stebalien
Copy link
Member

(I mean, this is so much better than our usual "we know this works, don't touch it" approach)

@MichaelMure
Copy link
Contributor

(I mean, this is so much better than our usual "we know this works, don't touch it" approach)

Both @shazow and I are open source maintainer, we know what's up :)

@aschmahmann aschmahmann mentioned this pull request Dec 13, 2021
59 tasks
Jorropo pushed a commit to ipfs/go-libipfs-rapide that referenced this pull request Mar 23, 2023
…put-tst

Add test to maintain Put contract of calling Has first

This commit was moved from ipfs/go-ipfs-blockstore@6486d67
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants