Re: Sniffer/Stats Issues Reviewed

Jason <[email protected]> Wed, 29 Apr 2009 18:34:11 +0100
Newsgroups gmane.comp.cms.xaraya.devel
Organization Xaraya
Message-ID <[email protected]>
St.Ego wrote:
>>...
>> There's also very little reason why a UA string needs to be more than 
>> 255 characters.  The one Chad discovered could be considered malformed, 
>> as it had an extraneous version/platform declaration and, being based on 
>> Windows media center/IE, had three .NET CLR versions and the specific 
>> developer's URL, 283 characters in all.
> 
> FWIW, approximately 1/5 to 1/3 of all the Sniffer table entries were
> truncated at max length to fit the field prior to the upgrade on that
> client site. I believe the issue is MUCH more widespread than it may be
> perceived.

Perhaps we just need to make sure the entry is truncated to a length *we* set
before we attempt to process it. The error being fixed here is one of an
unexpected duplicate key due to the fact that we checked the existing
(truncated) data against the incoming (not-truncated) data. Make sure both are
truncated to avoid such an error.

However, there are still race conditions possible, so perhaps the 'duplicate
key' error should just be caught anyway and a further lookup performed to check
whether another session has written the UA same string since we did a lookup
(finding it not to be there).

-- Jason