After having a discussion with our ProjectMaster(tm), we came to the conclusion that I could spend my entire life trying to perfect things in core, without ever getting anywhere. So - here's the new me, heading towards the land of new features and lots of bugs, so that I can actually come out with a real product some day.
Thus:
- Handle exceptions in scheduler gracefully, logging the error but continueing non-the-less.
- Handle exceptions in ed2kclient API when requesting downloads.
- Handle exceptions while reading shared file gracefully.
- Divide bandwidth equally again between requests. Speeds up hnshell again.
- Dont store all filenames we receive from network - we dont do anything useful with them (right now), and they just waste useless cpu time (in metadb.cpp:370 loop), useless memory time (they are stored both in two places), and in the end, they are COMPLETELY useless for hydranode operation.
Note: This will be re-added when some user interface needs it, but until then, we can keep it disabled. - Suppress warnings about unhandled tags in hello packets (waaay too many of those).
- Suppress warnings from unhandled MuleInfo packet tags that we dont care about.
- Also check for m_sourceInfo before dropping clients. (this was the reason we were losing 30% of sources all the time).
- Dont disconnect a client just for sending NoFile packet at wrong time.
- Dont notify about SOCK_CONNECTED twice (the event is emitted from networking subsystem, no need to emit it from scheduler too) (was causing us to send Hello packets TWICE to each and every client).
- Hexdumps in hnshell now look correct again.
- Fixed scheduler speed calculations - they were off by one 100ms value, leading to somewhat lower actual limit than was expected.
- FileDesc (e.g. comment) packets are now properly handled and contents displayed.
Ok ok, so not new features, just another set of bugfixes ... but I'm getting there... Based on those improvements, I'v been able to run hydranode for 4-5 hour sessions, without any major problems (leaving it running overnight again to see how it goes for even longer session). If there are no more fatal bugs, we can de-feature-freeze the code finally and dive into actual new features we'v all been waiting for.
One session's log output analyzed and put into graph is viewable
here.The current open topic is ed2k clientlist, where we fail to detect duplicate sources properly, and thus during every 20 minutes, we double the sources (the new sources are received from server, and we fail to detect we already have them). The source of the bug is still unknown, but it's been around like forever. While we'r on the topic - I'v been thinking about using boost multi_index again at clientlist, since we need a damn lot of different lookups there, and some are rather tricky... based on my experience with it in partdata, think it'd simplify things a lot, however, we'v gotta be careful to not turn it into another compiler-killer - clients.cpp already takes like 7 seconds and uses 300+mb ram to compile even on high-end systems, adding multi_index lib in there would probably be the last straw that broke the camels back ...
On other news, official hydranode bugtracker (experimental) is up now, all bugs are welcome. Anonymous submitting is allowed (until someone starts abusing it ofcourse), altough registration is strongly encouraged. The url:
http://bugs.hydranode.com/Madcat, ZzZz
PS: The two big testfiles - had to reset them today due to some problems. However, 7 hrs after the reset, they are both again at ~16.5% completed.