You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2014/02/03 12:52:10 UTC

[jira] [Updated] (LUCENE-5431) Add FSLockFactory.toString()

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

Shai Erera updated LUCENE-5431:
-------------------------------

    Attachment: LUCENE-5431.patch

* Add toString to FSLockFactory
* Fix FilterDirectory to override getLockID
* Fix TestCrashCausesCorruptIndex to extend FilterDirectory

Does anyone see any problem with fixing toString, i.e. if there's an app that could be affected by that?

Also, could we simply toString() impls of all Directory and LockFactory to use class.getSimpleName(), to shorten the string?

> Add FSLockFactory.toString()
> ----------------------------
>
>                 Key: LUCENE-5431
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5431
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/store
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>         Attachments: LUCENE-5431.patch
>
>
> FSLockFactory doesn't override toString, which causes Dir.toString() to print the class.name@instance. I think it would be better if it printed e.g. the lockDir.
> I added it but TestCrashCausesCorruptIndex failed because it declares a Directory which doesn't override getLockID(), which returns toString(). I changed that Directory to extend FilterDirectory, and fixed FilterDirectory to override getLockID() to call in.getLockID().
> Will attach a patch shortly.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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