lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LUCENE-6957) NRTCachingDirectory is missing createTempOutput
Date Mon, 04 Jan 2016 17:55:39 GMT

    [ 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message