Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support afterID in queries #30

Draft
wants to merge 1 commit into
base: hive
Choose a base branch
from

Conversation

Rishi556
Copy link

@Rishi556 Rishi556 commented Dec 10, 2023

Used in place of offset. Causes timeouts, need to investigate why.

@Rishi556 Rishi556 marked this pull request as draft December 10, 2023 05:58
@bt-cryptomancer
Copy link
Collaborator

Please explain why you think it would be useful / important to support this. I'd rather not expand query features unless there is a good reason to do so. Also, what is the timeout issue you mentioned? Is that why this is still in draft status?

@Rishi556
Copy link
Author

High offsets cause issues like insane ram usage, we already know this from hive-engine, and can find other's discussing it online: https://stackoverflow.com/a/20730523. Give this a shot if you dare: https://accounts.hive-engine.com/accountHistory?account=risingstar2&offset=1000000, it will time out before getting a response.

For certain accounts, it's impossible to get the fully history through the API. I've got workarounds which is just connecting directly to the DB and making queries that can't be done from the API. There's also data stability issues when using offset. If data is added to the top of the stack between queries, certain data points can be duplicated, and this helps avoid that issue as well since rather than using an offset from 0, you'll have a fixed point to look after.

For some reason, using this code causes requests to time out occasionally. It's why it's in draft mode until I have time to debug what's wrong and fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants