You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucy.apache.org by "David E. Wheeler" <da...@justatheory.com> on 2016/06/22 06:07:17 UTC

[lucy-user] Lock Error on Windows

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


Re: [lucy-user] Lock Error on Windows

Posted by "David E. Wheeler" <da...@justatheory.com>.
On Jun 22, 2016, at 9:14 AM, Marvin Humphrey <ma...@rectangular.com> 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


Re: [lucy-user] Lock Error on Windows

Posted by Marvin Humphrey <ma...@rectangular.com>.
On Wed, Jun 22, 2016 at 8:45 AM, David E. Wheeler <da...@justatheory.com> wrote:
> On Jun 22, 2016, at 2:12 AM, Nick Wellnhofer <we...@aevum.de> 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

Re: [lucy-user] Lock Error on Windows

Posted by "David E. Wheeler" <da...@justatheory.com>.
On Jun 22, 2016, at 2:12 AM, Nick Wellnhofer <we...@aevum.de> 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


Re: [lucy-user] Lock Error on Windows

Posted by Nick Wellnhofer <we...@aevum.de>.
On 22/06/2016 08:07, David E. Wheeler wrote:
> Fellow Lucifers,
>
> I\u2019ve 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