Opened 17 years ago
Closed 17 years ago
#1330 closed defect (fixed)
dsproductls Unable to get source listing from for ps1-200909
| Reported by: | bills | Owned by: | bills |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | distribution | Version: | |
| Severity: | critical | Keywords: | |
| Cc: |
Description
We've run into a problem with dsproductls and the current datastore.
If the parameter --last_fileset stack.21936.18249.14 is provided
when listing ps1-200909 the following error is observed
Unable to get source listing from [url ommitted] for ps1-200909
I debugged this and the problem occurs in the constructor for the class Datastore::Record.pm.
my $class = shift;
my %p = validate_with(
params => \@_,
spec => {
uri => {
type => SCALAR,
callbacks => {
'is valid http uri' =>
sub { is_uri($_[0]) and $_[0] =~ /^http:/ },
},
default => 'http://example.org/',
},
},
allow_extra => 1,
);
my $self = bless \%p, ref $class || $class;
The method Params::Validate validate_with returns an empty hash. This gets used below to fill in the Record object (which is actually a Fileset)
This happens when parsing the first fileset line of the product list returned from the data store. Subsequent lines are parsed correctly.
Examining that input data shows nothing unusual. The problem occurs for a number of particular last_fileset values.
Note that dsproductls is used by summit copy and has so far seemed reliable. The distribution system tends to result in larger fileset lists because a lot of data is posted quickly. Summit copy's lists have only a day or two worth of exposures typically.
The Params::Validate module (version 0.91) that we are using is installed as a perl XS module (compiled c code) so it is difficult to debug why happens.
I have found a couple of ways to work around the problem
- If I delete the existing module and dynamic library and install with --pm (pure perl) the problem is not observed.
- If I change Record.pm to use bless $_[0] (the incoming hash of parameters) instead of %p the has returned by validate_with the problem does not occur.
Note a later version of Params::Validate is avabilble but it has new dependencies that are currently unresolved by the IPP enviornment.

We updated the Params:Validate module to .92 and this problem is no longer observed