-
Notifications
You must be signed in to change notification settings - Fork 256
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
Issue #1043: Fixing problems after restart of Frontier service #1054
Issue #1043: Fixing problems after restart of Frontier service #1054
Conversation
Signed-off-by: Michael Dinzinger <michael.dinzinger@uni-passau.de>
Signed-off-by: Michael Dinzinger <michael.dinzinger@uni-passau.de>
.../urlfrontier/src/main/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBolt.java
Outdated
Show resolved
Hide resolved
.../urlfrontier/src/main/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBolt.java
Outdated
Show resolved
Hide resolved
🛠 Lift Auto-fixSome of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1 # Download the patch
curl https://lift.sonatype.com/api/patch/github.com/DigitalPebble/storm-crawler/1054.diff -o lift-autofixes.diff
# Apply the patch with git
git apply lift-autofixes.diff
# Review the changes
git diff Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command: curl https://lift.sonatype.com/api/patch/github.com/DigitalPebble/storm-crawler/1054.diff | git apply Once you're satisfied, commit and push your changes in your project. Footnotes |
.../urlfrontier/src/main/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBolt.java
Outdated
Show resolved
Hide resolved
.../urlfrontier/src/main/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBolt.java
Show resolved
Hide resolved
.../urlfrontier/src/main/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBolt.java
Outdated
Show resolved
Hide resolved
...frontier/src/test/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBoltTest.java
Outdated
Show resolved
Hide resolved
...frontier/src/test/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBoltTest.java
Outdated
Show resolved
Hide resolved
...frontier/src/test/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBoltTest.java
Outdated
Show resolved
Hide resolved
...frontier/src/test/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBoltTest.java
Outdated
Show resolved
Hide resolved
Judging by grpc/grpc-java#8177 it is not necessary to recreate the channel, only the streamObservers |
@michaeldinzinger I have made some changes to your PR, would it be easier if I pushed these in a separate PR and we take it as a continuation of the discussion or would you rather rework the one you have started here? |
Signed-off-by: Michael Dinzinger <michael.dinzinger@uni-passau.de>
Hello Julien, sorry, I haven't seen your message as I was also just working on it and just pushed a change to the PR. You might want to have a look and, in case your and my code modifications diverge, you could modify it here in this PR I omitted the additional thread and used the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few comments for now, please look at the existing ones as well. Will have a closer look on Monday. Thanks!
...frontier/src/test/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBoltTest.java
Outdated
Show resolved
Hide resolved
.../urlfrontier/src/main/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBolt.java
Show resolved
Hide resolved
.../urlfrontier/src/main/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBolt.java
Outdated
Show resolved
Hide resolved
...frontier/src/test/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBoltTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Michael Dinzinger <michael.dinzinger@uni-passau.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like we are nearly there but could you please look at the remaining few comments? Thanks @michaeldinzinger
...frontier/src/test/java/com/digitalpebble/stormcrawler/urlfrontier/StatusUpdaterBoltTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Michael Dinzinger <michael.dinzinger@uni-passau.de>
Signed-off-by: Michael Dinzinger <michael.dinzinger@uni-passau.de>
I hope I didn't miss any comment. In case there are further remarks to work on, please let me know |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great thanks @michaeldinzinger
Hello,
this PR should fix two problems which I faced when the crawler was communicating with an URLFrontier service, and this service was down and restarted. These problems do not appear in case the URLFrontier just keeps running without any complications. However, in case the URL Frontier goes down and has to be restarted, it means, as a consequence, that the StormCrawler has to be restarted because it is in a failed state.
The two code changes are therefore:
The starvation looks like this: