[ 
https://issues.apache.org/jira/browse/LUCENE-6957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15081471#comment-15081471
 ] 

Adrien Grand edited comment on LUCENE-6957 at 1/4/16 5:55 PM:
--------------------------------------------------------------

{code}
+        IndexOutput out = first.createTempOutput(prefix, suffix, context);
+        String name = out.getName();
+        if (slowFileExists(second, name)) {
+          out.close();
+          toDelete.add(name);
+        } else {
+          success = true;
+          return out;
+        }
{code}

Maybe this should be protected by a try/finally block so that we also close and 
add name to toDelete if slowFileExists fails?


was (Author: jpountz):
{code}
+        IndexOutput out = first.createTempOutput(prefix, suffix, context);
+        String name = out.getName();
+        if (slowFileExists(second, name)) {
+          out.close();
+          toDelete.add(name);
+        } else {
+          success = true;
+          return out;
+        }
{code}

Maybe this should be protected by a try/catch block so that we also close and 
add name to toDelete if slowFileExists fails?

> NRTCachingDirectory is missing createTempOutput
> -----------------------------------------------
>
>                 Key: LUCENE-6957
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6957
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: Trunk
>
>         Attachments: LUCENE-6957.patch
>
>
> It's broken now because it simply delegates to the wrapped dir now,
> which can create an output that already exists in the ram dir cache.
> This bug only affects trunk (it's never been released).



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to