Skip to main content.
home | support | download

Back to List Archive

RE: Swish-e hangs when searching

From: <Rainer.Scherg(at)not-real.rexroth.de>
Date: Tue Feb 20 2001 - 12:23:15 GMT
Basically, replacing files when in access is a bad idea.

You should use a lock file, for search or copy operation.
During copy you should delay any search.

If the index is large, use:
   copy new index to new location as tmpfile
   try to lock index
   if ok then
      move new tmp index to index file
   unlock

> -----Original Message-----
> From: Stefan Bergstrand [mailto:stefan.bergstrand@polopoly.com]
> Sent: Tuesday, February 20, 2001 11:31 AM
> To: Multiple recipients of list
> Subject: [SWISH-E] Swish-e hangs when searching
> 
> 
> 
> 
> I have a Java application which performs a swish-e search using
> exec(). Once in a while the swish-e process hangs in a loop that looks
> like this when i run truss on it. (truss -f -p 10276)
> 
> 
> swish-e -f <indexfile> -w quorn*
> 
> 
> [...]
> 10276:  read(3, 0x0004B17C, 8192)                       = 0
> 10276:  llseek(3, 0, SEEK_CUR)                          = 0x7FFFF5E1
> 10276:  lseek(3, 0x80002612, SEEK_SET)                  Err#22 EINVAL
> 10276:  read(3, 0x0004B17C, 8192)                       = 0
> 10276:  llseek(3, 0, SEEK_CUR)                          = 0x7FFFF5E1
> 10276:  lseek(3, 0x80002612, SEEK_SET)                  Err#22 EINVAL
> 10276:  read(3, 0x0004B17C, 8192)                       = 0
> [...]
> 
> 
> Any ideas what might have happened?
> 
> The index <indexfile> is updated (copied from another host) every 2
> hours. Is it possible that there could be a problem if it is replaced
> exactly while the search is performed?
> 
> 
> /Stefan Bergstrand - Polopoly AB
> 
> 
> -- 
> 
> 
> 
> -----------------------------------------------------------
> This Mail has been checked for Viruses
> Attention: Encrypted Mails can NOT be checked !
> 
> ***
> 
> Diese Mail wurde auf Viren ueberprueft
> Hinweis: Verschluesselte Mails koennen NICHT geprueft werden!
> ------------------------------------------------------------
> 
Received on Tue Feb 20 12:28:05 2001