[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13610885#comment-13610885 ] Commit Tag Bot commented on LUCENE-4364: [branch_4x commit] Robert Muir http://svn.apache.org/viewvc?view=revisionrevision=1382800 LUCENE-4364: MMapDirectory makes too many maps for CFS MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Affects Versions: 4.0-ALPHA Reporter: Robert Muir Fix For: 4.0, 5.0 Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13451060#comment-13451060 ] Uwe Schindler commented on LUCENE-4364: --- Hi Robert, patch with new tests look great! +1 to commit and also backport. MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13451148#comment-13451148 ] Robert Muir commented on LUCENE-4364: - Hi Uwe, thanks for the vote of confidence and reviews and help. I'll commit to trunk tonight, give hudson a weekend at it, and backport monday if there are no issues. I don't expect any problems though, I think this is just as simple as before and we can move forwards to simplify CFS access. MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13451224#comment-13451224 ] Robert Muir commented on LUCENE-4364: - Committed to trunk only. lets bake it over the weekend. MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Affects Versions: 4.0-ALPHA Reporter: Robert Muir Fix For: 5.0, 4.0 Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449529#comment-13449529 ] Uwe Schindler commented on LUCENE-4364: --- One question: Why did you change the chunkSize to be passed in ctor? For this patch its unrelated, or do I miss something. We now pass everything through ctor, but then its inconsequent to make the useUnmapHack to be a setter (unless we make it a static for all new MMapDirectories)? MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449555#comment-13449555 ] Robert Muir commented on LUCENE-4364: - it was an intermediate step. unlike unmaphack, its a little more broken for chunkSize to be a setter. with one of the previous patches, i noticed that if you were to change this at certain times it could be bad news. so I wanted to prevent the possibility of problems... probably not an isssue now. MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449557#comment-13449557 ] Robert Muir commented on LUCENE-4364: - We should put the IllegalStateException back. there is no sense in pretending to support slices from clones, its totally untested and not useful. If its useful somehow in the future and we have good tests thats different, but currently its useless and untested. MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449583#comment-13449583 ] Uwe Schindler commented on LUCENE-4364: --- I have nothing against that, but it is *not* completely untested, look at the code :-) When you clone a slice, the offset of the original must be applied by the code when calling the private slice method - and that is done now. This was necessary to unify the clone and slice method to one common code. But I agree we should not support this until we remove the IndexInputSlicer class at all and make every IndexInput sliceable (in a later issue). There is no chance that user code can call this method, as it is private to ByteBufferIndexInput. MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449591#comment-13449591 ] Uwe Schindler commented on LUCENE-4364: --- I forgot to mention: My patch also fixes a small bug in MMapIndexInput: If you closed a clone, this did not change it's state at all, the close() method of clones was completely ignored. I changed that to at least unset the buffers for this clone/slice, so later calls throw AlreadyClosed. Clones of that one (previously created) are not affected. The top-level cleanup also unsets all clones of course again, but thats fine. Theoretically, closed clones could be removed from the map, but that is unneeded, because they will diappear automatically (as soon as they are unreferenced). MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449593#comment-13449593 ] Robert Muir commented on LUCENE-4364: - its completely untested except with offset=0 and length=length, thats my problem (that doesnt count). its also totally unnecessary to support: there is absolutely, positively, zero use-case. ill change the patch to add it back. ill also remove the assert getFilePointer() == 0L (nothing depends on that). MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449615#comment-13449615 ] Robert Muir commented on LUCENE-4364: - while reviewing the CFS reading code i see the classic assert-should-be-check-put-return-value: {noformat} assert !mapping.containsKey(id): id= + id + was written multiple times in the CFS; mapping.put(id, fileEntry); {noformat} Ill fix this and re-sync up the patch. MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449729#comment-13449729 ] Michael McCandless commented on LUCENE-4364: This patch looks great! MMapDir is so simple now ... and I love how slice is a method on BBII. Very nice to nuke openFullSlice too. MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449199#comment-13449199 ] Uwe Schindler commented on LUCENE-4364: --- Hey, I did not yet fully review the patch, but with ByteBuffers we can do the EOF case very easy (the problem Mike had in his CachedDirectory). ByteBuffer internally checks limit() in all cases, so you cannot read beyond the limit. So when we create a slicer, the last buffer could be created not by a simple duplicate(), but instead by ByteBuffer.slice() [which is also a duplicate, but with other start [in our case still 0], but with a limited length (the modulo of (startOffset + length) % bufsize). As ByteBuffer is doing the checks in all cases, a duplicate buffer with a shorter length makes reading behind EOF impossible. The checks are done in all cases, by explicitely giving a limit for the last buffer we can correctly support EOF with IndexOutofBoundsException. MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449206#comment-13449206 ] Robert Muir commented on LUCENE-4364: - Uwe: this is how the whole patch works already. See the slice method. {code} slices[slices.length-1].limit((int) (sliceEnd chunkSizeMask)); {code} Please apply the patch to review, and you can see that there are no added checks here. MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449217#comment-13449217 ] Uwe Schindler commented on LUCENE-4364: --- Sorry, i did not see that, your patch already does that! :-) MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449381#comment-13449381 ] Robert Muir commented on LUCENE-4364: - note we should add the bounds checks for offset/length to this .slice() method just as a sanity check (i had them in the original patch, sorry). MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449426#comment-13449426 ] Uwe Schindler commented on LUCENE-4364: --- Hi, thats a great improvement. Very simple! In my opinion, we should maybe check, if we can remove the whole Slicer in all Indexinputs? Just make the slice(...) method return the current BufferedIndexInput-based one. This could be another issue, once this is in. About the patch: - With the IndexInputSlicer which has a private mastercopy of the originalIndexInput, the openFullSlice method is garanteed to have 0L as file pointer. We should maybe assert this (because this is important, as in contrast to MMapIndexInput.slice(), clone() returns a clone with the same filepointer as the original). So add a assert 0L == cloned.getFilePointer(). - I think we could minimize the code duplication in clone() and slice(). Just use slice() as only implementation and let clone() look like this (not tested): {code:java} public MMapIndexInput clone() { final MMapIndexInput clone = this.slice(this.description, 0L, this.length); try { clone.seek(this.getFilePointer()); } catch (IOException ioe) { throw new RuntimException(Cannot happen...); } return clone; } {code} By that the code is not duplicated. The only downside is that it seeks two times on clone, but that should not be a problem. MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-4364) MMapDirectory makes too many maps for CFS
[ https://issues.apache.org/jira/browse/LUCENE-4364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449428#comment-13449428 ] Robert Muir commented on LUCENE-4364: - Uwe: seems like good ideas i think. I'm going to sleep so feel free to play. I just wanted to get some progress made tonight, but I feel better about it. Additionally for a directory like Mike's (with array-backed bytebuffer) or maybe a future RAMDir or whatever this would be reusable stuff I think. MMapDirectory makes too many maps for CFS - Key: LUCENE-4364 URL: https://issues.apache.org/jira/browse/LUCENE-4364 Project: Lucene - Core Issue Type: Bug Reporter: Robert Muir Attachments: LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch, LUCENE-4364.patch While looking at LUCENE-4123, i thought about this: I don't like how mmap creates a separate mapping for each CFS slice, to me this is way too many mmapings. Instead I think its slicer should map the .CFS file, and then when asked for an offset+length slice of that, it should be using .duplicate()d buffers of that single master mapping. then when you close the .CFS it closes that one mapping. this is probably too scary for 4.0, we should take our time, but I think we should do it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org