frontera icon indicating copy to clipboard operation
frontera copied to clipboard

HBaseState flush when frontier stop

Open clarksun opened this issue 8 years ago • 2 comments

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.

clarksun avatar Dec 28 '17 09:12 clarksun

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

sibiryakov avatar Dec 28 '17 10:12 sibiryakov

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.

sibiryakov avatar Jan 24 '18 09:01 sibiryakov