[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#682172: unblock: couchdb/1.2.0-2



On Wed, 2012-11-21 at 21:44 +0100, Michael Biebl wrote:
> On 21.11.2012 21:39, Laszlo Boszormenyi (GCS) wrote:
> >  Tested on the CLI, then copied late in the evening. Will be:
> > ++    while [ $($COUCHDB -s 2>/dev/null | grep -c process) -eq 1 ]; \
> > ++        do echo -n .; sleep 1; done;
> > 
> > Is it okay to upload -3 with the discussed changes?
> 
> Thanks, that looks a bit better. My only concern now would be, that you
> can end up in a endless loop if the couchdb instance doesn't want to die.
> Can such a situation happen or will couchdb -d forcefully kill the
> processes automatically?
 I don't think it'll be forcefully killed, but not sure. I'm not good in
Erlang. But I propose the following then just to be sure:
RET=1;
for i in $(seq 1 30); do
  status=`$COUCHDB -s 2>/dev/null | grep -c process`;
  if [ "$status" -eq 0 ]; then
    RET=0;
    break;
  fi;
  echo -n .;
  sleep 1s;
done;
return $RET

Should the time be increased or maybe decreased? Half a minute sounds
acceptable for me, but you may think otherwise.

Cheers,
Laszlo/GCS


Reply to: