Perl driver and find_master

78 views
Skip to first unread message

Jason Lewis

unread,
Nov 27, 2012, 2:11:22 PM11/27/12
to mongod...@googlegroups.com
I'm using the lastest perl driver and find_master doesn't behave as I expect.

If I do this, everything works:

$mongo3 is the master.

my $conn = MongoDB::Connection->new( host => "mongodb://$mongo3:$port",
"port" => $port,
query_timeout => "-1",
"find_master" => 1
);

This does not work:

my $conn = MongoDB::Connection->new( host =>
"mongodb://$mongo3:$port,$mongo2:$port,$mongo1:$port",
"port" => $port,
query_timeout => "-1",
"find_master" => 1
);

couldn't find master at
/usr/local/lib/perl/5.12.4/MongoDB/Connection.pm line 486.

This works:

my $conn = MongoDB::Connection->new( host =>
"mongodb://$mongo3:$port,$mongo2:$port,$mongo1:$port",
"port" => $port,
query_timeout => "-1"
);

As long is master is first and find master is off, it works. The
errors don't really help with troubleshooting. Is there something I'm
missing?

jas

Mike Friedman

unread,
Feb 5, 2013, 9:55:47 AM2/5/13
to mongod...@googlegroups.com
Hi Jas,

It looks like this might be a bug in the Perl driver's implementation of find_master. I've filed a bug report here for further investigation:

https://jira.mongodb.org/browse/PERL-210


Mike
Reply all
Reply to author
Forward
0 new messages