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

Jason Gerlowski commented on SOLR-16468:
----------------------------------------

Hi [~jdurham] thanks for the PR.

bq. Is there a base class I can use to create tests for Collection level code?

I find myself going back to {{SolrCloudTestCase}} a good bit.  It's a bit 
heavyweight - it stands up a full SolrCloud cluster complete with ZK - but it 
does provide you everything you need to run admin SolrCloud APIs.

I'm not against mocks for testing these sort of things, fwiw.  We already have 
solid test coverage for many/most of these Collection "admin" operations.  IMO 
duplicating those is a bit heavyweight just to validate that the v2 API looks 
and works the way we want it to.  So mocks make sense here IMO.  There are 
folks here who don't love them though, for downsides you're probably familiar 
with: mainly brittleness and readability.  So we don't have tons of mock tests. 
 But IMO they're fine when there's not a better option.

bq. Looking through the existing adocs, I didn't see anything documenting the 
Collection snapshots V1 APIs

You're absolutely right.  They're mentioned obliquely in 
{{modules/deployment-guide/pages/backup-restore.adoc}}, but only as core APIs 
(not collection).  I'd think the writeup on that page should be cleaned up a 
bit and they should be given their own sections in 
{{modules/deployment-guide/pages/collection-management.adoc}}.  In terms of 
whether that makes sense as a part of this ticket or a separate JIRA, I could 
go either way.  If you're willing to make those changes and they're not too 
huge, I'd say let's just include them here.  If you're imagining chunkier 
changes or you don't want to gate this PR on and docs changes, that'd also be 
fine.  Happy to trust your judgement there.

> Create v2 equivalent of v1 'CREATESNAPSHOT', 'LISTSNAPSHOT' and 
> 'DELETESNAPSHOT' (collection level)
> ---------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-16468
>                 URL: https://issues.apache.org/jira/browse/SOLR-16468
>             Project: Solr
>          Issue Type: Sub-task
>          Components: v2 API
>    Affects Versions: 9.2
>            Reporter: Sanjay Dutt
>            Assignee: Jason Gerlowski
>            Priority: Major
>              Labels: V2, newdev
>
> Snapshot API has no v2 equivalent at collection level. This ticket is to 
> track changes made to the Solr to add v2 equivalent of 'CREATESNAPSHOT', 
> 'LISTSNAPSHOT' and 'DELETESNAPSHOT' api.
> Proposed API design
>  * collection CREATESNAPSHOT - POST 
> /api/collections/collName/snapshots/snapshotName
>  * collection LISTSNAPSHOT - GET /api/collections/collName/snapshots
>  * collection DELETESNAPSHOT - DELETE 
> /api/collections/collName/snapshots/snapshotName
> A few other pointers that might be helpful, especially for newcomers:
>  * The v1 logic for this API lives in CollectionsHandler (for the 
> collection-level APIs) and CoreAdminHandler (for the core-level APIs).
>  * Some discussion of how APIs work in Solr (Particularly the "APIs in Solr" 
> section.)
>  * A step-by-step guide to creating APIs using the preferred v2 API framework
>  * [A recent PR that adds a v2 API, as an 
> example|https://github.com/apache/solr/pull/1061/files]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to