lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Miller (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3564) rename IndexWriter.rollback to .rollbackAndClose
Date Tue, 08 Nov 2011 00:20:52 GMT

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

Mark Miller commented on LUCENE-3564:
-------------------------------------

{quote} API design/naming is not easy, and generally developers are unable to
name things properly because we are too familiar with the code to see
what traps users. {quote}

I don't fully buy that. I think it generally makes us better at naming and that the supposed
traps are generally a small percentage of the users running into problems because our javadoc
has often sucked.

bq. I guess it's OK to leave rollback as "short but misleading"; 

It's not misleading if the javadoc explains the indexwriter is closed. Ive said it before,
but its worth saying again - trying to design API's for those that doesn't read the javadoc
is a poor move. Most of the problems we see can be traced back to not having javadoc that
fully explains things, not poorly named methods.

bq. users don't understand the cost of optimize.

Users didn't understand the cost of optimize because the javadoc never explained the cost
in the past. It simply said this makes things better. The method name was never the problem
if you ask me. People read javadoc because only morons program by method name. Often our javadoc
has not explained the problems that have been brought up well in the past.
                
> rename IndexWriter.rollback to .rollbackAndClose
> ------------------------------------------------
>
>                 Key: LUCENE-3564
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3564
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 3.5, 4.0
>
>
> Spinoff from LUCENE-3454, where Shai noticed that rollback is trappy since it [unexpected]
closes the IW.
> I think we should rename it to rollbackAndClose.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message