lbryio / lbry-sdk

The LBRY SDK for building decentralized, censorship resistant, monetized, digital content apps.
https://lbry.com
MIT License
7.19k stars 483 forks source link

Filter unreleased content from claim_search #2591

Closed kauffj closed 2 years ago

kauffj commented 4 years ago

Content with a release_date in the future should not be returned.

https://twitter.com/iykury/status/1188285028490330112

tzarebczan commented 4 years ago

This is making queries time out when we pass it via the app + use with other filters.

edit: Nevermind about this particular case, but there's still cases with some combination of params where it times out and it shouldn't. This should be fixed in postgres re-write.

patrickkeane commented 3 years ago

I would be happy to look into this issue, but it is not clear to me what the expected behavior should be.

While filtering claim_search results can resolve the "video from the future" problem, is it the intent that the release_date field should allow postdated content (rather than for historical bookkeeping use)? The fact that lbryio/lbry-desktop#3126 is closed in favor of this issue suggests that a post-dated release_date is meaningful for some use case / user story. If that is not the case, then it should be a matter of sanity checking input for APIs that modify release_date, and gracefully dealing with any malformed release dates of the future.

As a matter of efficiency, it would be best not to filter results if it is not necessary.

Is that (other) use case defined?

patrickkeane commented 3 years ago

For what its worth, I can understand why any desktop issue was closed, as this issue was demonstrated using the SDK alone, as far as I can tell. So, that seems like the proper target for a fix.

jackrobison commented 2 years ago

This was fixed in scribe with a lower and upper bound for release time