[jira] [Updated] (LUCENE-6932) Seek past EOF with RAMDirectory should throw EOFException

2016-02-10 Thread Michael McCandless (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael McCandless updated LUCENE-6932:
---
Fix Version/s: 5.4.2

> Seek past EOF with RAMDirectory should throw EOFException
> -
>
> Key: LUCENE-6932
> URL: https://issues.apache.org/jira/browse/LUCENE-6932
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: core/index
>Affects Versions: master
>Reporter: Stéphane Campinas
> Fix For: master, 5.x, 5.4.2
>
> Attachments: LUCENE-6932.patch, LUCENE-6932.patch, LUCENE-6932.patch, 
> issue6932.patch, testcase.txt
>
>
> In the JUnit test case from the attached file, I call "IndexInput.seek()" on 
> a position past
> EOF. However, there is no EOFException that is thrown.
> To reproduce the error, please use the seed test: 
> -Dtests.seed=8273A81C129D35E2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6932) Seek past EOF with RAMDirectory should throw EOFException

2016-01-21 Thread Michael McCandless (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael McCandless updated LUCENE-6932:
---
Attachment: LUCENE-6932.patch

OK here's a new patch, folding in [~jpountz]'s new test (thank you!), and
simplifying how {{RAMInputStream}} tracks its current buffer: I
removed {{bufferStart}} and removed the {{boolean enforceEOF}} param
to {{switchCurrentBuffer}} and removed lazy setting the buffer in the
ctor.  I renamed {{switchCurrentBuffer}} to {{setCurrentBuffer}} and
simplified it so that it's no longer responsible for enforcing EOF,
and added a new private {{nextBuffer}}, called when we read bytes,
where we enforce EOF.

I think net/net it's simpler, and tests pass once!


> Seek past EOF with RAMDirectory should throw EOFException
> -
>
> Key: LUCENE-6932
> URL: https://issues.apache.org/jira/browse/LUCENE-6932
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: core/index
>Affects Versions: Trunk
>Reporter: Stéphane Campinas
> Fix For: Trunk, 5.x
>
> Attachments: LUCENE-6932.patch, LUCENE-6932.patch, issue6932.patch, 
> testcase.txt
>
>
> In the JUnit test case from the attached file, I call "IndexInput.seek()" on 
> a position past
> EOF. However, there is no EOFException that is thrown.
> To reproduce the error, please use the seed test: 
> -Dtests.seed=8273A81C129D35E2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6932) Seek past EOF with RAMDirectory should throw EOFException

2016-01-21 Thread Michael McCandless (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael McCandless updated LUCENE-6932:
---
Attachment: LUCENE-6932.patch

New patch, with an idea from [~jpountz] that {{RAMInputStream.seek}} should 
throw {{EOFException}} immediately if you try to seek beyond the end of the 
file, rather than delaying it until the next read, which adds confusing code 
now.

So I did, simplifying {{seek}}, added a test case, and fixed {{seek}} javadocs 
explaining this change...

> Seek past EOF with RAMDirectory should throw EOFException
> -
>
> Key: LUCENE-6932
> URL: https://issues.apache.org/jira/browse/LUCENE-6932
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: core/index
>Affects Versions: Trunk
>Reporter: Stéphane Campinas
> Fix For: Trunk, 5.x
>
> Attachments: LUCENE-6932.patch, LUCENE-6932.patch, LUCENE-6932.patch, 
> issue6932.patch, testcase.txt
>
>
> In the JUnit test case from the attached file, I call "IndexInput.seek()" on 
> a position past
> EOF. However, there is no EOFException that is thrown.
> To reproduce the error, please use the seed test: 
> -Dtests.seed=8273A81C129D35E2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6932) Seek past EOF with RAMDirectory should throw EOFException

2016-01-08 Thread Michael McCandless (JIRA)

 [ 
https://issues.apache.org/jira/browse/LUCENE-6932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael McCandless updated LUCENE-6932:
---
Attachment: LUCENE-6932.patch

Thanks [~stephane campinas], I merged your two patches together into one, and 
changed the approach a bit to avoid adding a new {{enforceEOF}} member to 
{{RAMInputStream}} ... does it look OK?

> Seek past EOF with RAMDirectory should throw EOFException
> -
>
> Key: LUCENE-6932
> URL: https://issues.apache.org/jira/browse/LUCENE-6932
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: core/index
>Affects Versions: Trunk
>Reporter: Stéphane Campinas
> Attachments: LUCENE-6932.patch, issue6932.patch, testcase.txt
>
>
> In the JUnit test case from the attached file, I call "IndexInput.seek()" on 
> a position past
> EOF. However, there is no EOFException that is thrown.
> To reproduce the error, please use the seed test: 
> -Dtests.seed=8273A81C129D35E2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6932) Seek past EOF with RAMDirectory should throw EOFException

2015-12-15 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/LUCENE-6932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stéphane Campinas updated LUCENE-6932:
--
Attachment: testcase.txt

> Seek past EOF with RAMDirectory should throw EOFException
> -
>
> Key: LUCENE-6932
> URL: https://issues.apache.org/jira/browse/LUCENE-6932
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: core/index
>Affects Versions: Trunk
>Reporter: Stéphane Campinas
> Attachments: testcase.txt
>
>
> In the JUnit test case from the attached file, I call "IndexInput.seek()" on 
> a position past
> EOF. However, there is no EOFException that is thrown.
> To reproduce the error, please use the seed test: 
> -Dtests.seed=8273A81C129D35E2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (LUCENE-6932) Seek past EOF with RAMDirectory should throw EOFException

2015-12-15 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/LUCENE-6932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stéphane Campinas updated LUCENE-6932:
--
Attachment: issue6932.patch

A possible solution

> Seek past EOF with RAMDirectory should throw EOFException
> -
>
> Key: LUCENE-6932
> URL: https://issues.apache.org/jira/browse/LUCENE-6932
> Project: Lucene - Core
>  Issue Type: Bug
>  Components: core/index
>Affects Versions: Trunk
>Reporter: Stéphane Campinas
> Attachments: issue6932.patch, testcase.txt
>
>
> In the JUnit test case from the attached file, I call "IndexInput.seek()" on 
> a position past
> EOF. However, there is no EOFException that is thrown.
> To reproduce the error, please use the seed test: 
> -Dtests.seed=8273A81C129D35E2



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org