lucy git commit: Fix previous merge of 'improve-locking' branch

2017-04-16 Thread nwellnhof
Repository: lucy Updated Branches: refs/heads/master d7feb9970 -> 5535d25f8 Fix previous merge of 'improve-locking' branch I accidentally merged the first version of the 'improve-locking' branch. Add changes to the 'v2' branch as separate commit. Project:

[2/2] lucy-clownfish git commit: Don't create callbacks for excluded methods

2017-04-16 Thread nwellnhof
Don't create callbacks for excluded methods Ideally, there should be a way to only omit the callback function definition in order to allow custom implementations. Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit:

[12/16] lucy git commit: Release locks on destruction

2017-04-16 Thread nwellnhof
Release locks on destruction Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/d23b560d Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/d23b560d Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/d23b560d Branch:

[03/16] lucy git commit: Always check for stale locks in Is_Locked

2017-04-16 Thread nwellnhof
Always check for stale locks in Is_Locked Note that checking for stale locks isn't necessary when requesting shared locks. Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/1a8e02df Tree:

[09/16] lucy git commit: Don't hide I/O errors behind LockErr

2017-04-16 Thread nwellnhof
Don't hide I/O errors behind LockErr Only return a LockErr if there's lock contention, not on unrelated I/O errors. Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/e06cdbf6 Tree:

[16/16] lucy git commit: Merge branch 'improve-locking'

2017-04-16 Thread nwellnhof
Merge branch 'improve-locking' Fixes LUCY-323. - Major rewrite of FilePurger, making it do less work. - Eliminate global deletion lock, making PolyReader and FilePurger never wait for a lock. - Redesign Lock API in preparation for native locks. - Remove LockFactory. - Fix locking bug with

[07/16] lucy git commit: Remove Lock_Is_Locked

2017-04-16 Thread nwellnhof
Remove Lock_Is_Locked Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/38a33bad Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/38a33bad Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/38a33bad Branch:

[13/16] lucy git commit: Move host ivar from Lock to LockFileLock

2017-04-16 Thread nwellnhof
Move host ivar from Lock to LockFileLock Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/2bd2bc61 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/2bd2bc61 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/2bd2bc61

[06/16] lucy git commit: Separate purging of snapshots and aborted merges

2017-04-16 Thread nwellnhof
Separate purging of snapshots and aborted merges Purge aborted merge when starting an Indexer/BGMerger session and purge snapshots at the end of Commit. Rework FilePurger to use a single hash for purged and spared files when purging snapshots. Optimize Folder handling assuming that Snapshots

[14/16] lucy git commit: Move LockFileLock to separate file

2017-04-16 Thread nwellnhof
Move LockFileLock to separate file Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/6e8538a8 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/6e8538a8 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/6e8538a8

[15/16] lucy git commit: Merge branch 'master' into improve-locking

2017-04-16 Thread nwellnhof
Merge branch 'master' into improve-locking Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/a3cf33f1 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/a3cf33f1 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/a3cf33f1

[05/16] lucy git commit: Remove LockFactory and make Lock a private class

2017-04-16 Thread nwellnhof
Remove LockFactory and make Lock a private class If there are users who really use custom locks, this can be reverted. Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/3e229865 Tree:

[04/16] lucy git commit: Merge SharedLock into LockFileLock

2017-04-16 Thread nwellnhof
Merge SharedLock into LockFileLock Supplying the lock type when requesting a lock better matches other file lock APIs. Merging the implementations allows to convert Maybe_Delete_File into a static function. Make shared and exclusive locks check for locks of the other type except for exclusive

[11/16] lucy git commit: Port LockFileLock tests to C

2017-04-16 Thread nwellnhof
Port LockFileLock tests to C Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/35388cd2 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/35388cd2 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/35388cd2 Branch:

[08/16] lucy git commit: Improve merge lock handling

2017-04-16 Thread nwellnhof
Improve merge lock handling Don't check the merge lock with Is_Locked in FilePurger_Purge_Aborted_Merge. This prevented background mergers from cleaning up because they already held the merge lock. Require that callers hold the merge lock instead. Don't check the merge lock with Is_Locked in

[01/16] lucy git commit: Rework snapshot and deletion locks

2017-04-16 Thread nwellnhof
Repository: lucy Updated Branches: refs/heads/master 7a64a288c -> d7feb9970 Rework snapshot and deletion locks Request exclusive or shared snapshot locks instead of the global deletion lock. This removes the need to retry lock requests and reduces contention. Project:

[10/16] lucy git commit: Change lock acquitision order in BGMerger_init

2017-04-16 Thread nwellnhof
Change lock acquitision order in BGMerger_init Obtain the merge lock before the write lock so that an already running background merger won't abort when failing to acquire the write lock during commit. Release the merge lock at the very end of BGMerger_Commit. It doesn't really matter when we