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

Jason Gerlowski commented on SOLR-16462:
----------------------------------------

One reason that the async stuff is tricky in v2 vs v1 is the different 
lifecycles used by each framework.  "Admin" RequestHandlers like 
"CoreAdminHandler" are generally instantiated once and only once for the entire 
life of that JVM - which allows CoreAdminHandler to track  status in a regular 
instance variable.  JAX-RS API classes are instantiated on a per-request basis 
(by default), so instance variables aren't "durable" across different requests.

I guess we could create a base-class for our APIs, e.g. "AsyncTrackingApiBase", 
with a static instance to hold this status info, that gets extended by various 
API subclasses.  I don't love the idea of introducing non-constant static 
state, but I think it'd work?

Alternatively, we could have the status map live as an instance variable of 
CoreContainer (or some class accessible off of CoreContainer)  It has the 
lifecycle we're after.  It's also a better fit conceptually: having the 
status-map live in CoreAdminHandler breaks the single-responsibility-principle, 
as it's putting api code and node/process-level state in the same class.  
CoreContainer OTOH, (or some object available through it transitively), is a 
better place for that state.

What would you think of that latter approach?

> Create v2 equivalent of v1 'CREATESNAPSHOT', 'LISTSNAPSHOT' and 
> 'DELETESNAPSHOT' (core level) 
> ----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-16462
>                 URL: https://issues.apache.org/jira/browse/SOLR-16462
>             Project: Solr
>          Issue Type: Sub-task
>          Components: v2 API
>    Affects Versions: 9.1
>            Reporter: Sanjay Dutt
>            Priority: Major
>              Labels: V2, newdev
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Snapshot API has no v2 equivalent. This ticket is to track changes made to 
> the Solr to add v2 equivalent of 'CREATESNAPSHOT', 'LISTSNAPSHOT' and 
> 'DELETESNAPSHOT' api.



--
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