patchmldonkey, a multi-networks file-sharing client - Patches: patch #5596, EDK: New option upload_full_chunks

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5596: EDK: New option upload_full_chunks

Submitter:  spiralvoice <spiralvoice>
Submitted:  Tue 28 Nov 2006 10:02:50 PM UTC
   
 
Category:  Bug fixes Priority:  5 - Normal
Status:  Done Assigned to:  None
Open/Closed:  Closed

Jump to the original submission

Mon 08 Jan 2007 12:21:21 PM UTC, comment #10: 

Committed 5596_4.patch, based on 5596_2_2.patch to CVS 2007/01/08

@TripleM:
Please open a new patch for your alternative full_chunks code.

spiralvoice <spiralvoice>
Group administrator
Mon 08 Jan 2007 12:16:38 PM UTC, comment #9: 

5596_4.patch is a small logging update for 5596_2_2.patch.

Regarding your alternative mechanism I have yet to think
about and test it.

(file #11700)

spiralvoice <spiralvoice>
Group administrator
Mon 08 Jan 2007 12:52:08 AM UTC, comment #8: 

updated to reflect current development. cause im lazy, only one patch is provided for both methods.

5596_3.patch has to be applied after avoid_duplicate_sending_v8_minimal (see http://mldonkey.sourceforge.net/forums/viewtopic.php?p=24924#24924)

(file #11695)

TripleM <triplem>
Sun 07 Jan 2007 07:49:32 PM UTC, comment #7: 

included some checks to prevent emule-rotational-request caused rerequests, but outoforder-rerequests are allowed. (some naming changes like in pangos avoid_duplicate_sending)

as before, 5596_2_2_alt_addon_3.patch is the addon patch for 5596_2_2.patch, so one can test both methods. it has to be applied after 5596_2_2.patch.
5596_2_2_alt_standalone_3.patch is the standalone patch.

(file #11693, file #11694)

TripleM <triplem>
Wed 27 Dec 2006 03:01:24 PM UTC, comment #6: 

corrected a typo and added some additional logging facility.

as before, 5596_2_2_alt_addon_2.patch is the addon patch for 5596_2_2.patch, so one can test both methods. it has to be applied after 5596_2_2.patch.
5596_2_2_alt_standalone_2.patch is the standalone patch.

(file #11610, file #11611)

TripleM <triplem>
Fri 22 Dec 2006 03:52:18 AM UTC, comment #5: 

implemented an alternative full chunk upload method. the goal of this algorithm is to complete chunks, if a partial chunk is requested, or serve a full chunk. no overflowdata is served. requested chunk is determined through:
- compute the middle of a blockrequest: (begin_pos + end_pos)/2
- compute the chunk: block_middle/chunk_size

no further serving after last accepted request in this session, if one of the following conditions:
- request of another file
- request of another chunk
- blockrequestsize > zonesize (180kb) or < 0

5596_2_2_alt_addon.patch is the addon patch for 5596_2_2.patch, so one can test both methods. it has to be applied after 5596_2_2.patch.
5596_2_2_alt_standalone.patch is the standalone patch.

(file #11577, file #11578)

TripleM <triplem>
Thu 21 Dec 2006 09:21:10 PM UTC, comment #4: 

i have done some changes to your patch, so that removing a clients slot does not stop downloads from this client, or otherwise influence download behaviour.


(file #11574)

TripleM <triplem>
Thu 21 Dec 2006 04:00:06 PM UTC, comment #3: 

lines 49-53 and 195-198 of your patch are pure wrong, imho.
+  List.iter (fun (file, chunks, up) ->
+    try CommonSwarming.unregister_uploader up with _ -> ()
+  ) c.client_file_queue;
+  c.client_file_queue <- []
CommonSwarming-uploaders are not the clients, you upload to, but from which you download. if you unregister a client there, you stop the download from this client. same goes for emptying client_file_queue, these are the files, you are interested in.

both are misplaced in DonkeyOneFile.remove_client_slot, i think, cause we want to stop uploading to this client, but dont want to stop downloading, if we do this atm. they should stay indeed in DonkeyClient.disconnect_client.

TripleM <triplem>
Sat 02 Dec 2006 12:56:31 PM UTC, comment #2: 

Updated patch for current CVS

(file #11432)

spiralvoice <spiralvoice>
Group administrator
Fri 01 Dec 2006 03:35:13 PM UTC, comment #1: 

Removed current patch, split session values into new patch #5606,
new version for this feature will be released after testing of
patch 5606 finished.

spiralvoice <spiralvoice>
Group administrator
Tue 28 Nov 2006 10:02:50 PM UTC, original submission:  

This new option makes it necessary to distinguish between overall
data transfered to/from the client and the data from the current
session. Unpatched MLDonkey only stores overall values of all
sessions during which the client transfered data, this lead to
the fact that an uploader which had a slot for less than a minute
was displayed having transfered several MB.

This patch implements new data structures to store up- and download
both as total and session values and displays them in HTML interface.
Session values instead of total values are sent to GUIs.

If the new option upload_full_chunks is set to true, each client is
allowed to receive one chunk, this setting overrides upload_lifetime.

Well, not exactly one chunk. eMule has this code in opcode.h
#define SESSIONMAXTRANS (PARTSIZE+20*1024) // "Try to send complete chunks" always sends this amount of data

MLdonkey does the same, if client A got 9728000+20*1024 bytes
during the current session its upload slot will be revoked unless
pending slots are empty. It makes no sense to remove a client
from an upload slot if no new client is present to use it.
Client A will then get another data block and this situation is
logged. The check is done before every block is sent. If client B
is present in pending slots when the next block should be sent to
client A, client A is removed from upload slots and client B is
given a slot.

I removed lots of code from disconnect_client to remove_client_slot,
because client A in the above example, after revoking the upload
slot, will not be disconnected anymore. Its allowed to re-enter
pending slots immediatly, also we may download from it at the
same time, disconnecting would be a bad idea.

Please test behaviour of this patch if its consistent. Also
please report if seperated columns for overall/session data
are still missing somewhere.

spiralvoice <spiralvoice>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #11700:  5596_4.patch added by spiralvoice (11KiB - text/x-diff)
file #11695:  5596_3.patch added by triplem (14KiB - text/x-patch)
file #11693:  5596_2_2_alt_addon_3.patch added by triplem (8KiB - text/x-patch)
file #11610:  5596_2_2_alt_addon_2.patch added by triplem (7KiB - text/x-patch)
file #11577:  5596_2_2_alt_addon.patch added by triplem (5KiB - text/x-patch)
file #11574:  5596_2_2.patch added by triplem (10KiB - text/x-patch)
file #11432:  5596_2.patch added by spiralvoice (12KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by triplem (Posted a comment)
  • -email is unavailable- added by spiralvoice (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 16 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-01-08 spiralvoice StatusReady For Test Done
        Open/ClosedOpen Closed
    2007-01-08 spiralvoice Attached File- Added 5596_4.patch, #11700
    2007-01-08 triplem Attached File- Added 5596_3.patch, #11695
    2007-01-07 triplem Attached File- Added 5596_2_2_alt_addon_3.patch, #11693
        Attached File- Added 5596_2_2_alt_standalone_3.patch, #11694
    2006-12-27 triplem Attached File- Added 5596_2_2_alt_addon_2.patch, #11610
        Attached File- Added 5596_2_2_alt_standalone_2.patch, #11611
    2006-12-22 triplem Attached File- Added 5596_2_2_alt_addon.patch, #11577
        Attached File- Added 5596_2_2_alt_standalone.patch, #11578
    2006-12-21 triplem Attached File- Added 5596_2_2.patch, #11574
    2006-12-02 spiralvoice Attached File- Added 5596_2.patch, #11432
        StatusPostponed Ready For Test
    2006-12-01 spiralvoice Attached File#11393 Removed
    2006-12-01 spiralvoice StatusReady For Test Postponed
    2006-11-28 spiralvoice Attached File- Added edk_full_chunks.patch, #11393

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code