Subject: | YAML_LOAD_WARN_DUPLICATE_KEY in try_push |
Sometimes (very rarely, about once a fortnight) I get this error:
* YAML Warning: Duplicate map key found. Ignoring.
Code: YAML_LOAD_WARN_DUPLICATE_KEY
Line: 51
Document: 1
at /home/nigelhorne/perlmods/share/perl/5.10.0/YAML/Mo.pm line 24,
<$IN> line 1.
YAML::Mo::__ANON__('YAML::Loader=HASH(0x13ce380)',
'YAML_LOAD_WARN_DUPLICATE_KEY') called at
/home/nigelhorne/perlmods/share/perl/5.10.0/YAML/Loader.pm line 359
YAML::Loader::_parse_mapping('YAML::Loader=HASH(0x13ce380)', '') called
at /home/nigelhorne/perlmods/share/perl/5.10.0/YAML/Loader.pm line 168
YAML::Loader::_parse_node('YAML::Loader=HASH(0x13ce380)') called at
/home/nigelhorne/perlmods/share/perl/5.10.0/YAML/Loader.pm line 358
YAML::Loader::_parse_mapping('YAML::Loader=HASH(0x13ce380)', '') called
at /home/nigelhorne/perlmods/share/perl/5.10.0/YAML/Loader.pm line 168
YAML::Loader::_parse_node('YAML::Loader=HASH(0x13ce380)') called at
/home/nigelhorne/perlmods/share/perl/5.10.0/YAML/Loader.pm line 103
YAML::Loader::_parse('YAML::Loader=HASH(0x13ce380)') called at
/home/nigelhorne/perlmods/share/perl/5.10.0/YAML/Loader.pm line 25
YAML::Loader::load('YAML::Loader=HASH(0x13ce380)', '---\x{a}chain:
!!perl/hash:Data::Throttler::BucketChain\x{a} bucket_...') called at
/home/nigelhorne/perlmods/share/perl/5.10.0/YAML.pm line 34
YAML::Load('---\x{a}chain:
!!perl/hash:Data::Throttler::BucketChain\x{a} bucket_...') called at
/home/nigelhorne/perlmods/share/perl/5.10.0/YAML.pm line 75
YAML::LoadFile('/home/nigelhorne/concert-bands.co.uk/../tmp/throttle')
called at /home/nigelhorne/perlmods/share/perl/5.10.0/Data/Throttler.pm
line 623
Data::Throttler::Backend::YAML::load('Data::Throttler::Backend::YAML=HASH(0xdf40f8)') called at /home/nigelhorne/perlmods/share/perl/5.10.0/Data/Throttler.pm line 131
Data::Throttler::try_push('Data::Throttler=HASH(0xdf3c18)', 'key',
78.150.225.52) called at cbl2.pl line 237
I do not have code to 100% reproduce it, it only happens on rare
occaisions. Here is the caller:
my $throttler = Data::Throttler->new(
max_items => 15,
interval => 90,
backend => 'YAML',
backend_options => {
db_file => $info->tmpdir() . '/throttle'
}
);
unless($throttler->try_push(key => $remote)) {
$istrawler = 1;
}