lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From goran kent <gorank...@gmail.com>
Subject Re: [lucy-user] Couldn't completely remove 'seg_N'
Date Fri, 18 Nov 2011 10:22:09 GMT
On Thu, Nov 17, 2011 at 9:08 AM, Marvin Humphrey <marvin@rectangular.com> wrote:
> If you don't supply a hostname, machines will zap each other's lockfiles.

Another one of these has popped up this morning:

"Lucy::Index::Indexer->new failed (Couldn't completely remove 'seg_2'"

...even though I'm using IndexManager:

my $manager = Lucy::Index::IndexManager->new(
        host => $host,
    );
$index = Lucy::Index::Indexer->new(
            schema   => $schema,
            index    => $target,
            manager  => $manager,
            create   => 1,
            truncate => 0,
        );

The lockfile contains:
{
  "host": "host6",
  "name": "write",
  "pid": "24342"
}

The hostname and PID correspond to the current host and the PID
corresponds to the script trying to update the index at the time of
the Lucy::Index::Indexer->new above.  The seg_2 timestamp matches the
lockfile's, so it seems improbable that some other writer created
seg_2... especially if they are all (ie, all the indexer cluster
nodes) now using IndexManager which provides improved locking.

Is my code sample above correct in it's usage of IndexManager()?  eg,
do I need to do specify anything else to ensure write exclusivity?  Is
there something else going on here?

thanks

Mime
View raw message