While originally I was supposed to continue with my 0.1 release roadmap (4 entries there), today morning I discovered hydranode had crashed, and after extensive analysis, it came out that we were corrupting our main containers in ClientList. The thing is, ClientID updates were either delayed, or not properly updated at all in ClientList, which led to gradual, but definate screwup of the maps structure, which in turn led to lookups starting to fail, and all hell breaking loose. So I spent several hours tracking this thing down, debugging, and finally realized that only way to solve it finally and properly, and avoid such things in the future, is re-structure the subsystem. The re-structuring could be coupled with the ED2KFilesList idea that I'v been having for some time now - the idea is to write a wrapper API around PartData objects, which would allow us to keep track of sources-per-file (currently not possible), and thus start doing A4AF and other nifty stuff. However, that would take at least a day to fully design, plus several days of implementation time, so I think it has to be pushed past 0.1 release. With those thoughts, I headed down to the original problem again, and implemented a short-term, working solution - using signal to propagate the idchange up w/o any delays.
The current 0.1 roadmap includes 4 items:
- Fully re-enable compressed downloads (currently supported, but the support is not announced, since if we lose connection in the middle of transfer, we lose entire 180kb chunk due to non-dynamic unpacking code)
- Implement configure options and the underlying scripts to allow building modules into core, as well as perform fully static application linking.
- Format the lists in hnsh better; key items by numbers, allow operating on items using those identifiers. This is first phase of hnshell upgrades - second phase (some time in the mysterious future) involves full tab-completition support, and operating with string-keys.
- Actual credits storing/bookkeeping. While we have SecIdent, and queue calculation engine already takes credits into account, we still don't store uploaded/downloaded data in credits yet.
Full list of today's patches merged to CVS:
- [core] logFatalError() now also prints full pretty function name before abort()'ing
- [ed2k] Dropped passive sources aquisition for UDP ReaskAck packets - not worth the effort.
- [core/ed2k] Reduced header interdependancies with forward declaration; affected over 30 files over the codebase; now less files need to be recompiled on headers changes.
- [core] Enabled automatic stack trace and log trace printing on crashes, to aid in bugreporting when hydranode was running outside debugger. But don't rely on this - the stack trace is very primitive, and provides only very basic information - full gdb backtrace is still the only way to fly.
- [ed2k] Removed target<>() mechanism from ED2KParser (not used, simply useless noise, taking up resources).
- [ed2k] Client::changeId is now a signal (concept identical to QT signals). ClientList containers are now fully synced with id changes - no more zombie-clients, no more broken lookups etc.
- [core] Added accessors for SchedBase::getConnLimit(), get***reqCount().
- [ed2k] Added getLowCount() accessor into FoundSources packet
- [ed2k] Avoid choking ourselves with connections when receiving more than connLimit sources from server at time. Now we make sure we leave enough free connections to be able to accept all LowId callbacks that we requested. The HighID connections that weren't possible to perform right after receiving the sources are delayed for 120 seconds, and performed then. This should somewhat raise the amount of successful LowID connections when running close to connections limit.
Madcat, ZzZz