#180 new
dougw

parallel DRB access sometimes returns someone else's results?

Reported by dougw | February 21st, 2011 @ 11:24 PM

Hopefully I'm just doing something wrong, but if I run the following two scripts at the same time, eventually the dining script will get the attraction results, and the other script will get the other guy's results.

Traced with logging all the way down to the drb call, where we clearly send over the right query and get back someone else's results.

production, apache, passenger, rails 2.3.5, ferret in drb mode.

acts_as_ferret (0.4.8.2)
jk-ferret (0.11.8.2)

/api/search is 1 line, which is calling find_with_ferret and returning the models back as json.

if [ ! -f /tmp/dining ]; then

curl -s "https://xxxxxxx/api/search?api_key=123&query=category:Dining" > /tmp/dining

fi
while true; do

curl -s "https://xxxxxxx/api/search?api_key=123&query=category:Dining" > /tmp/dining.$$
cmp /tmp/dining /tmp/dining.$$
if [ $? -ne 0 ]; then 
break
fi

done

if [ ! -f /tmp/attractions ]; then

curl -s "https://xxxxxxx/api/search?api_key=123&query=category:Attractions" > /tmp/attractions

fi
while true; do

curl -s "https://xxxxxxx/api/search?api_key=123&query=category:Attractions" > /tmp/attractions.$$
cmp /tmp/attractions /tmp/attractions.$$
if [ $? -ne 0 ]; then 
break
fi

done

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Pages