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

Allow using a NewWriteThrough() blockstore. #112

Merged
merged 4 commits into from
Mar 8, 2023
Merged

Allow using a NewWriteThrough() blockstore. #112

merged 4 commits into from
Mar 8, 2023

Conversation

hsanjuan
Copy link
Collaborator

Similar to blockservice.NewWriteThrough().

Currently the default blockstore trades read amplification for every write. While this is fine in cases where writes are very expensive and the datastore offers a quick Has() method, it is not always the case.

Some datastore backends may be better off just getting all the writes no matter what. At least I would like to try it out.

Similar to blockservice.NewWriteThrough().

Currently the default blockstore trades read amplification for every
write. While this is fine in cases where writes are very expensive and the datastore offers a quick Has() method, it is not always the case.

Some datastore backends may be better off just getting all the writes no
matter what. At least I would like to try it out.
@hsanjuan hsanjuan self-assigned this Feb 27, 2023
@hsanjuan hsanjuan requested a review from a team March 6, 2023 12:56
blockstore.go Outdated Show resolved Hide resolved
@hsanjuan hsanjuan requested a review from Jorropo March 8, 2023 09:44
blockstore.go Show resolved Hide resolved
blockstore.go Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Mar 8, 2023

Suggested version: v1.3.0

Comparing to: v1.2.0 (diff)

Changes in go.mod file(s):

diff --git a/go.mod b/go.mod
index 6161e15..5fe47bc 100644
--- a/go.mod
+++ b/go.mod
@@ -15,4 +15,25 @@ require (
 	go.uber.org/atomic v1.6.0
 )
 
-go 1.16
+require (
+	github.com/gogo/protobuf v1.2.1 // indirect
+	github.com/google/uuid v1.1.1 // indirect
+	github.com/jbenet/goprocess v0.1.4 // indirect
+	github.com/mattn/go-colorable v0.1.1 // indirect
+	github.com/mattn/go-isatty v0.0.5 // indirect
+	github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect
+	github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771 // indirect
+	github.com/mr-tron/base58 v1.1.3 // indirect
+	github.com/multiformats/go-base32 v0.0.3 // indirect
+	github.com/multiformats/go-base36 v0.1.0 // indirect
+	github.com/multiformats/go-multibase v0.0.3 // indirect
+	github.com/multiformats/go-varint v0.0.5 // indirect
+	github.com/opentracing/opentracing-go v1.0.2 // indirect
+	github.com/spaolacci/murmur3 v1.1.0 // indirect
+	github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc // indirect
+	golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 // indirect
+	golang.org/x/net v0.0.0-20190620200207-3b0461eec859 // indirect
+	golang.org/x/sys v0.0.0-20190412213103-97732733099d // indirect
+)
+
+go 1.19

gorelease says:

# summary
Suggested version: v1.3.0

gocompat says:

Your branch is up to date with 'origin/master'.

Cutting a Release (and modifying non-markdown files)

This PR is modifying both version.json and non-markdown files.
The Release Checker is not able to analyse files that are not checked in to master. This might cause the above analysis to be inaccurate.
Please consider performing all the code changes in a separate PR before cutting the release.

Automatically created GitHub Release

A draft GitHub Release has been created.
It is going to be published when this PR is merged.
You can modify its' body to include any release notes you wish to include with the release.

@Jorropo
Copy link
Contributor

Jorropo commented Mar 8, 2023

@hsanjuan LGTM Thx, I can merge it, but just so you know Kubo use the v0 branch of this package.
https://github.com/ipfs/go-datastore this is one of thoses forked even tho we don't admit packages, I see you based your work on v1.2.0 are you sure this is good for you ?

Forget this, I mistaken go-datastore and go-ipfs-blockstore.

Copy link
Contributor

@Jorropo Jorropo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ty

@Jorropo Jorropo merged commit 25a6cb8 into master Mar 8, 2023
@Jorropo Jorropo deleted the writethrough branch March 8, 2023 11:00
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.

None yet

2 participants