[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SRM once more



Hi Kannan,

I've got 2 issues:

1.)
It seems to me that recovery from packet loss doesn't work as it
should if the first packet (sequence number 0) gets lost:

-------------------------------------------------
	virtual int request(SRMinfo* sp, int hi) {
		int miss = 0;
		if (!hi || sp->ldata_ >= hi)
			return miss;
		
		int maxsize = ((int)log10(hi) + 2) * (hi - sp->ldata_);

-------------------------------------------------

Why don't you make it "log10(hi+1)" and leave out the "!hi ||" ?


2.)
In SRMAgent::command(...)

-------------------------------------------------
[...]
			sip_->distance_ = 0.0;
[...]
-------------------------------------------------

Initializing distance_ to 0 causes trouble when scheduling a repair request
because the event is then scheduled _exactly_ at "now" and this causes
trouble when the tcl-precision is somewhat <17 digits (digits are cut
off which in turn causes the event to be scheduled in the past).

Would be better to set distance_ to 1.0 (as is done in the
SRMinfo-constructor).


Hope I don't bother you but I thought it might be valuable comments.