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

HBaseState flush when frontier stop #310

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clarksun
Copy link
Contributor

flush method in HBaseState invoked every 5 minutes by default settings to save cache state into meta table, add frontier_stop method to prevent state loss from memory cache dict when sw instance terminated.

flush method in HBaseState invoked every 5 minutes by default settings to save cache state into meta table, add frontier_stop method to prevent state loss from memory cache dict when sw instance terminated.
@sibiryakov
Copy link
Member

Good catch @clarksun! I'm going to merge it.

@sibiryakov
Copy link
Member

I have checked this code again, @clarksun and found that SW was already running the flush when stopping https://github.com/scrapinghub/frontera/blob/master/frontera/worker/strategy.py#L291, if we apply your patch it will be flushing two times. I propose to remove the state cache flush on stopping from SW then and make sure frontier_stop will be executed.

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.

2 participants