[lucy-user] Lock Error on Windows

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[lucy-user] Lock Error on Windows

David E. Wheeler-2
Fellow Lucifers,

I’ve been seeing this error from PGXN::API tests running on Windows but no Linux or OS X:

Failed to obtain lock at 'locks/write.lock': CreateHardLink for new file 'E:\pgxn\pgxn-api\t\test_doc_root\_index\docs\locks\write.lock' from 'E:\pgxn\pgxn-api\t\test_doc_root\_index\docs\locks\write.lock..3564' failed: Incorrect function.
        LUCY_Lock_Obtain_IMP at core\Lucy\Store\Lock.c line 108
        lucy_Indexer_init at core\Lucy\Index\Indexer.c line 107
        at C:/Strawberry/perl/site/lib/Lucy.pm line 118.
        Lucy::Index::Indexer::new("Lucy::Index::Indexer", "index", "t\\test_doc_root\\_index\\docs", "schema", Lucy::Plan::Schema=SCALAR(0x376c484), "create", 1) called at E:\pgxn\pgxn-api\lib/PGXN/API/Indexer.pm line 149
        PGXN::API::Indexer::indexer_for(PGXN::API::Indexer=HASH(0x334b62c), "docs") called at t\indexer.t line 836

Is this a known issue? Do I need to tweak something special for Windows in my code? The line in question is here:

  https://github.com/pgxn/pgxn-api/blob/master/lib/PGXN/API/Indexer.pm#L149

Thanks,

David


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] Lock Error on Windows

Nick Wellnhofer
On 22/06/2016 08:07, David E. Wheeler wrote:
> Fellow Lucifers,
>
> I’ve been seeing this error from PGXN::API tests running on Windows but no Linux or OS X:
>
> Failed to obtain lock at 'locks/write.lock': CreateHardLink for new file 'E:\pgxn\pgxn-api\t\test_doc_root\_index\docs\locks\write.lock' from 'E:\pgxn\pgxn-api\t\test_doc_root\_index\docs\locks\write.lock..3564' failed: Incorrect function.

What's the filesystem on drive E:? If it's FAT, this is expected.

Nick

Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] Lock Error on Windows

David E. Wheeler-2
On Jun 22, 2016, at 2:12 AM, Nick Wellnhofer <[hidden email]> wrote:

> What's the filesystem on drive E:? If it's FAT, this is expected.

Oh, it’s HFS+, mounted my Mac from the Windows VM running inside VirtualBox.

Case-insensitivity?

Best,

David


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] Lock Error on Windows

Marvin Humphrey
On Wed, Jun 22, 2016 at 8:45 AM, David E. Wheeler <[hidden email]> wrote:
> On Jun 22, 2016, at 2:12 AM, Nick Wellnhofer <[hidden email]> wrote:
>
>> What's the filesystem on drive E:? If it's FAT, this is expected.
>
> Oh, it’s HFS+, mounted my Mac from the Windows VM running inside VirtualBox.

OK, that probably explains it.  It seems plausible that the Windows
`CreateHardLink` function does not support HFS+.

Lucy uses the creation of hard links for atomic operations such as
committing a new version of the index or establishing a write lock.
Data is staged by writing it out completely to temp files, then goes
"live" at the moment a hard link gets created at a canonical location.

Marvin Humphrey
Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] Lock Error on Windows

David E. Wheeler-2
On Jun 22, 2016, at 9:14 AM, Marvin Humphrey <[hidden email]> wrote:

> OK, that probably explains it.  It seems plausible that the Windows
> `CreateHardLink` function does not support HFS+.
>
> Lucy uses the creation of hard links for atomic operations such as
> committing a new version of the index or establishing a write lock.
> Data is staged by writing it out completely to temp files, then goes
> "live" at the moment a hard link gets created at a canonical location.

Okay, I’ll ignore it then, since it’s likely a rarity to be using it the way I was.

Best,

David


smime.p7s (5K) Download Attachment