-
Notifications
You must be signed in to change notification settings - Fork 110
[WIP] Pushsync #1323
[WIP] Pushsync #1323
Conversation
nolash
left a comment
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.
The review contains some comments from parts of the diff that is out of scope of the push sync stuff; I didn't realize the scope until later on. Handling them is optional then, I guess.
| Validate(ch Chunk) bool | ||
| } | ||
|
|
||
| // ValidatorStore encapsulates Store by decorting the Put method |
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.
What does decorting mean?
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.
It is a typo, it should be decorating.
| SubscribePush(context.Context) (<-chan storage.Chunk, func()) | ||
| // called to set a chunk as synced - and allow it to be garbage collected | ||
| // TODO this should take ... last argument to delete many in one batch | ||
| Set(context.Context, chunk.ModeSet, storage.Address) error |
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.
let's set the interface correctly right away, but comment it only handles the first element for now.
|
needs rebase @zelig |
…ore db migration (elad) (#1335)
* swarm/shed: remove metrics fields from DB struct * swarm/schunk: add String methods to modes * swarm/storage/localstore: add metrics and traces * swarm/chunk: unknown modes without spaces in String methods * swarm/storage/localstore: remove bin number from pull subscription metrics * swarm/storage/localstore: add resetting time metrics and code improvements
* swarm/chunk: add tags backend to chunk package
swarm/api: integrate tags to count chunks being split and stored swarm/api/http: integrate tags in middleware for HTTP `POST` calls and assert chunks being calculated and counted correctly swarm: remove deprecated and unused code, add swarm hash to DoneSplit signature, remove calls to the api client from the http package
* swarm/storage: remove traces for put/get/set * swarm/storage: remove Has traces
8817225 to
c98771c
Compare
|
reopen |
ad91427 to
9b1543c
Compare
|
superseded by #1392 |
This PR implements push syncing protocol in a new package
swarm/storage/pusherThe PR uses the localstore integration branch until it is merged.
The entry point to push sync is the
RunPushSyncfunction which will be called onswarm.golevel.It uses two interfaces:
SubscribePushandSetmethods implements this.pss.PubSubimplements this interfacestorer nodes which accept push synced content will run
RunStoreronswarm.golevelIt obsoletes the earlier #971
and greatly simplifies the code.
It needs: