This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
api,client,http,main,prod,storage: Add query param for publisher and solve flooding in recovery #2202
Merged
santicomp2014
merged 19 commits into
global-pinning
from
global-pinning-fix-request-flooding
Jun 16, 2020
Merged
api,client,http,main,prod,storage: Add query param for publisher and solve flooding in recovery #2202
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
540187d
api/client,api:http,cmd/swarm,prod,storage: added flag for publisher …
santicomp2014 0463f7a
storage: changed recovery only when publisher is set
santicomp2014 0e8b18e
prod,netstore: added logs for flood test
santicomp2014 ca488fd
storage: remove publisher after recovery
santicomp2014 f5236ec
storage: removed test publisher removal
santicomp2014 754739b
prod: added log for publisher in getPinners
santicomp2014 0787628
api,api/client,apit/http,cmd/swarm,cmd/swarm-smoke: removed publisher…
santicomp2014 f1b0fbf
cmd/swarm: remove unused log in download path
santicomp2014 e25597e
api/client,api/http,cmd/swarm: added publisher to bzz-list for recove…
santicomp2014 6a9a30a
api/client,api/http,cmd/swarm,prod,storage: removed unused comments a…
santicomp2014 d5d3de9
Merge branch 'global-pinning' into global-pinning-fix-request-flooding
santicomp2014 19edb39
storage: changed comments in netstore for clarity in global pinning
santicomp2014 aecc382
api/client,api/http,cmd/swarm,storage: changed publisher query param …
santicomp2014 41cfbe5
api/client: encoded publisher in query param
santicomp2014 688122a
api/http: added isRecoveryAttempt to List, storage changed recoveryCa…
santicomp2014 79f3867
api: removed Manifest not found from readManifest, global pinning wil…
santicomp2014 5e57f81
api/http,storage: changed StatusRecoveryAttempt to 420, refactored Er…
santicomp2014 3494897
api/http: added isRecoveryAttemptError for HandleGetFile
santicomp2014 6cc23bf
api/http: changed StatusRecoveryAttempt to StatusEnhanceYourCalm
santicomp2014 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,6 @@ type ManifestEntry struct { | |
Status int `json:"status,omitempty"` | ||
Access *AccessEntry `json:"access,omitempty"` | ||
Feed *feed.Feed `json:"feed,omitempty"` | ||
Publisher string `json:"publisher,omitempty"` | ||
} | ||
|
||
// ManifestList represents the result of listing files in a manifest | ||
|
@@ -243,7 +242,6 @@ func readManifest(mr storage.LazySectionReader, addr storage.Address, fileStore | |
if err != nil { // size == 0 | ||
// can't determine size means we don't have the root chunk | ||
log.Trace("manifest not found", "addr", addr) | ||
err = fmt.Errorf("Manifest not Found") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. leaving a comment here mainly for @zelig: the in any case, i believe without line There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes exactly, the error code becomes Manifest not found and the error code is 500. |
||
return | ||
} | ||
if size > manifestSizeLimit { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used
req.URL.Query().Add("publisher", publisher)
and the query param was not reaching the other side.I looked at other places of the code using Add/Set and it was encoding after adding it.
After changing it to
.Encode()
it works correctly.@mortelli saw the same thing