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

store: create links batch #516

Merged
merged 5 commits into from
Mar 4, 2019
Merged

store: create links batch #516

merged 5 commits into from
Mar 4, 2019

Conversation

t-bast
Copy link
Contributor

@t-bast t-bast commented Mar 4, 2019

Add the option to create multiple links in an atomic batch.
I chose to make it explicit that it's a batch by using a new route (it makes it easier for backwards-compatibility too). It's not unrealistic at some point to use the /links route and make it accept a more complex payload (collection of links + a boolean to choose what to do in case of error: atomic or not).

Fixes #515


This change is Reviewable

@ghost ghost assigned t-bast Mar 4, 2019
@ghost ghost added the review label Mar 4, 2019
@codecov
Copy link

codecov bot commented Mar 4, 2019

Codecov Report

Merging #516 into master will increase coverage by 0.14%.
The diff coverage is 85.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #516      +/-   ##
==========================================
+ Coverage   71.44%   71.58%   +0.14%     
==========================================
  Files         100      100              
  Lines        5564     5617      +53     
==========================================
+ Hits         3975     4021      +46     
- Misses       1223     1228       +5     
- Partials      366      368       +2
Impacted Files Coverage Δ
store/storetesting/mockadapter.go 73.75% <0%> (ø) ⬆️
postgresstore/postgresstore.go 75.29% <100%> (+0.59%) ⬆️
postgresstore/segment.go 63.44% <100%> (+0.39%) ⬆️
postgresstore/batch.go 69.76% <78.94%> (+7.26%) ⬆️
store/storehttp/storehttp.go 82.82% <90%> (+1.61%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f93ed0c...c807df7. Read the comment docs.

Copy link
Contributor Author

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 12 files reviewed, 2 unresolved discussions (waiting on @alexppxela, @golangcibot, and @jeremie-stratumn)


postgresstore/benchmark_test.go, line 37 at r1 (raw file):

Previously, golangcibot (Bot from GolangCI) wrote…

createStoreB is unused (from deadcode)

Done.


postgresstore/benchmark_test.go, line 58 at r1 (raw file):

Previously, golangcibot (Bot from GolangCI) wrote…

freeStoreB is unused (from deadcode)

Done.

Copy link
Contributor

@conord33 conord33 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 11 of 12 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @alexppxela, @golangcibot, and @jeremie-stratumn)

Copy link
Contributor

@jrmdayn jrmdayn left a comment

Choose a reason for hiding this comment

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

clean! :lgtm:

Reviewed 11 of 12 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @alexppxela and @golangcibot)

Copy link
Contributor

@alexppxela alexppxela left a comment

Choose a reason for hiding this comment

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

as usual!
:lgtm:

Reviewed 11 of 12 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @golangcibot)


store/storetestcases/batch.go, line 91 at r2 (raw file):

	})

	t.Run("CreateLink should rejects links after failure", func(t *testing.T) {

typo: rejects

Copy link
Contributor Author

@t-bast t-bast left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @golangcibot)


store/storetestcases/batch.go, line 91 at r2 (raw file):

Previously, alexppxela (Alexandre Thibault) wrote…

typo: rejects

Good catch! I'll fix that

@t-bast t-bast merged commit 6bc6e88 into master Mar 4, 2019
@ghost ghost removed the review label Mar 4, 2019
@t-bast t-bast deleted the bt/store/create-links branch March 4, 2019 17:44
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

5 participants