You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
In #2202 the timeout for getFeedContent was removed.
There seems to be an issue with the context that is passed down to the feed operations.
If there is a context timeout (starting from the download) that expires before reaching getFeedContent, then the recovery process will fail.
The combination of timeouts (the one from the download + the one from the recovery) is complex and should be tested appropriately to determine if the feed is able to get the content in time.
// getFeedContent creates a feed with the given topic and user, and attempts to fetch its content using the given handlerfuncgetFeedContent(ctx context.Context, handler feed.GenericHandler, topic feed.Topic, user common.Address) ([]byte, error) {
fd:= feed.Feed{
Topic: topic,
User: user,
}
query:=feed.NewQueryLatest(&fd, lookup.NoClue)
//ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)//defer cancel()_, err:=handler.Lookup(ctx, query)
// feed should still be queried even if there are no updatesiferr!=nil&&err.Error() !="no feed updates found" {
returnnil, ErrFeedLookup
}
_, content, err:=handler.GetContent(&fd)
iferr!=nil {
returnnil, ErrFeedContent
}
returncontent, nil
}
The text was updated successfully, but these errors were encountered:
In #2202 the timeout for
getFeedContent
was removed.There seems to be an issue with the context that is passed down to the feed operations.
If there is a context timeout (starting from the download) that expires before reaching
getFeedContent
, then the recovery process will fail.The combination of timeouts (the one from the download + the one from the recovery) is complex and should be tested appropriately to determine if the feed is able to get the content in time.
The text was updated successfully, but these errors were encountered: