-
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
Fix starvation and busy waiting of StatusUpdaterBolt.java, add Constants. #983
Conversation
…nts and ChannelManager. Signed-off-by: Felix Engl <felix.engl@uni-bamberg.de>
Signed-off-by: Felix Engl <felix.engl@uni-bamberg.de>
Signed-off-by: Felix Engl <felix.engl@uni-bamberg.de>
Why is it failing? I didn't even touch the class causing the error. |
The
|
.../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
The freak unrelated error might go by itself next time round. |
To sum up the proposed changes:
Causes for replacements:
p.s. if the text is too hard to read/understand please don't hesitate to ask. I'm on my phone at the moment and writing longer texts with that little thing is kind of hard. (or at least harder than I thought it would be. I'm really not a phone guy. :D) |
The ChannelManager is no more, removed it from the title. |
I did not know that, thanks!
this was the perfect level of explanation, thanks a lot! Can't believe you typed all that on your phone |
} | ||
} | ||
} catch (InterruptedException e) { | ||
LOG.info( |
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.
shouldn't the interrupt status be restored?
Thread.currentThread().interrupt();
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.
You are right, we have to handle an interrupt correctly.
I'll look up what ApacheStorm wants in this case.
Depending on that interrupt should be enough, otherwise we have to clean up manually before either throwing a new interrupt or whatever.
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.
Interrupt is enough, thank you!
The issues you raised with the synchronization would also affect the statusupdaterbolts in other modules like the ES one. Would be good to fix it there too. |
@FelixEngl do you have a Twitter account? I d like to mention your work there when it is merged |
Yes, I actually have one. (I cannot believe, that I was able to remember my login. But maybe I should use twitter a little bit more for communicating and liking projects I like :D) |
When I get to it I'll look at the other modules too. But right now I have some pressure regarding other projects etc. so atm I'm just optimizing what I need for myself. It would be nice, if we could make an issue and assign me to it. That way I wont forget do do that when I have some free time that I want to spend coding. (Otherwise I swear I'll forget it if I don't get some reminders of it. 🤣) To be honest, I am just glad that I can give something back to SC, because it is really helping me out with my phd-project. ❤️ |
…ext, handle interrupt accordingly. Signed-off-by: Felix Engl <felix.engl@uni-bamberg.de>
Merged, thanks @FelixEngl |
Requires #982, fixes various starvation and busy waiting problems in StatusUpdaterBolt.java. Everything else is from #982.
Signed-off-by: Felix Engl felix.engl@uni-bamberg.de
Thanks for contributing to StormCrawler, your efforts are appreciated!
Developer Certificate of Origin
By contributing to StormCrawler, you accept and agree to the following terms and conditions (the Developer Certificate of Origin) for your present and future contributions submitted to StormCrawler.
Please refer to the Developer Certificate of Origin section in
CONTRIBUTING.md
for details.Before opening a PR, please check that:
Thanks!