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

Sync up the total active urls value with state in UrlDbFunction #162

Open
vmagotra opened this issue Aug 16, 2018 · 1 comment
Open

Sync up the total active urls value with state in UrlDbFunction #162

vmagotra opened this issue Aug 16, 2018 · 1 comment

Comments

@vmagotra
Copy link
Contributor

The total active urls is being maintained as a regular variable in UrlDbFunction.
Sync up the total active urls value with state whenever we restore from state.

@kkrugler
Copy link
Member

kkrugler commented Sep 10, 2018

Since state is keyed on PLD, to keep track of the actual total URLs (across all PLDs) we'd need to do something like leverage the _domainScores (unsaved) variable. When onTimer() is called, if an entry for the key (PLD) doesn't exist, then we increment our (also unsaved) _totalActiveUrls counter. Since timers are saved as state, they will eventually all fire, and then our counter will be accurate.

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

No branches or pull requests

2 participants