lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4973) SnapshotDeletionPolicy should not require an id
Date Thu, 02 May 2013 06:42:16 GMT

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

Shai Erera commented on LUCENE-4973:
------------------------------------

Looks good! Comments:

* {{assertTrue(snapshot == sdp.getIndexCommit(snapshot.getGeneration()));}} -- can you change
to assertSame? They should be equivalent, only assertSame produces nicer error message.
** Same for {{assertTrue(s1 == s2); // should be the same instance}}

* SDP.snapshot javadoc:
** "using the same ID parameter"; I guess it's a copy-paste error from the previous SDP version?
** IllegalStateException still refers to ID

* releaseGen: can we relax it to not fail if someone calls release on an unsnpshotted gen?
I guess someone can workaround that by calling sdp.getIC(gen) and if not null call release.
But I think it's not necessarily an error to release an unsnapshotted gen, e.g. code which
releases from different places. No strong feelings about it though, so it's your call.

* Persistent -- do you want to change SNAPSHOT_ID to SNAPSHOT_GENS?
                
> SnapshotDeletionPolicy should not require an id
> -----------------------------------------------
>
>                 Key: LUCENE-4973
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4973
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 5.0, 4.4
>
>         Attachments: LUCENE-4973.patch, LUCENE-4973.patch
>
>
> The id is unnecessary and just adds complexity: SDP can just return
> the IndexCommit, and when you want to release you pass back the
> IndexCommit.  PersistentSDP can expose release(long gen).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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