Skip to content

Commit 2f302e0

Browse files
SOLR-16462: Create v2 equivalents for core-level snapshot CRUD functionality (#1126)
LISTSNAPSHOT, CREATESNAPSHOT, and DELETESNAPSHOT now have v2 equivalent APIs available at `GET /api/cores/coreName/snapshots`, `POST /api/cores/coreName/snapshots/snapshotName`, and `DELETE /api/cores/coreName/snapshots/snapshotName`, respectively. While in the code, this commit also fixes a bug in the response format of the v1 LISTSNAPSHOT API. Co-authored-by: Jason Gerlowski <[email protected]>
1 parent 5f6ddbf commit 2f302e0

File tree

13 files changed

+885
-278
lines changed

13 files changed

+885
-278
lines changed

solr/CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ Improvements
148148

149149
* SOLR-16665: The base docker image has been upgraded from Ubuntu 20 (Focal) to Ubuntu 22 (Jammy). (Houston Putman)
150150

151+
* SOLR-16462: v2 equivalents of the "Core Admin" `LISTSNAPSHOT`, `CREATESNAPSHOT`, and `DELETESNAPSHOT` commands are now available at
152+
`GET /api/cores/coreName/snapshots`, `POST /api/cores/coreName/snapshots/snapshotName`, and
153+
`DELETE /api/cores/coreName/snapshots/snapshotName`, respectively (John Durham via Jason Gerlowski)
154+
151155
Optimizations
152156
---------------------
153157

solr/core/src/java/org/apache/solr/core/CoreContainer.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,17 @@ protected void configure() {
10951095
.to(SolrNodeKeyPair.class)
10961096
.in(Singleton.class);
10971097
}
1098+
})
1099+
.register(
1100+
new AbstractBinder() {
1101+
@Override
1102+
protected void configure() {
1103+
bindFactory(
1104+
new InjectionFactories.SingletonFactory<>(
1105+
coreAdminHandler.getCoreAdminAsyncTracker()))
1106+
.to(CoreAdminHandler.CoreAdminAsyncTracker.class)
1107+
.in(Singleton.class);
1108+
}
10981109
});
10991110
jerseyAppHandler = new ApplicationHandler(containerHandlers.getJerseyEndpoints());
11001111
}

0 commit comments

Comments
 (0)