Skip to content

Commit dd9620b

Browse files
Added TODOs related to interface TransportIndicesResolvingAction
1 parent 1c47ad7 commit dd9620b

File tree

16 files changed

+33
-13
lines changed

16 files changed

+33
-13
lines changed

.idea/runConfigurations/Debug_OpenSearch.xml

Lines changed: 0 additions & 11 deletions
This file was deleted.

client/rest-high-level/src/main/java/org/opensearch/client/core/CountRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public final class CountRequest extends ActionRequest implements IndicesRequest.
6464
private Float minScore;
6565

6666
public CountRequest() {}
67+
// TODO: do we need implementation of TransportIndicesResolvingAction
6768

6869
/**
6970
* Constructs a new count request against the indices. No indices provided here means that count will execute on all indices.

modules/lang-mustache/src/main/java/org/opensearch/script/mustache/TransportSearchTemplateAction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
import java.util.Collections;
5959

6060
public class TransportSearchTemplateAction extends HandledTransportAction<SearchTemplateRequest, SearchTemplateResponse> {
61-
61+
// TODO: can we reuse implementation in TransportIndicesResolvingAction from TransportSearchAction?
62+
// TransportIndicesResolvingAction implement the interface
6263
private static final String TEMPLATE_LANG = MustacheScriptEngine.NAME;
6364

6465
protected final ScriptService scriptService;

modules/rank-eval/src/main/java/org/opensearch/index/rankeval/TransportRankEvalAction.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@
8080
* averaged precision at n.
8181
*/
8282
public class TransportRankEvalAction extends HandledTransportAction<RankEvalRequest, RankEvalResponse> {
83+
// TODO: implementation of TransportIndicesResolvingAction, can we reuse implementation from TransportSearchAction (MultiSearch used)?
84+
// MultiSearch used under the hood. Probably each search request has the same indices and index options
85+
// Should we reuse TransportSearchAction?
86+
8387
private final Client client;
8488
private final ScriptService scriptService;
8589
private final NamedXContentRegistry namedXContentRegistry;

server/src/main/java/org/opensearch/action/admin/cluster/snapshots/clone/TransportCloneSnapshotAction.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
* @opensearch.internal
5656
*/
5757
public final class TransportCloneSnapshotAction extends TransportClusterManagerNodeAction<CloneSnapshotRequest, AcknowledgedResponse> {
58+
// TODO: Q do we need here extensions related to TransportIndicesResolvingAction
5859

5960
private final SnapshotsService snapshotsService;
6061

server/src/main/java/org/opensearch/action/admin/indices/datastream/DeleteDataStreamAction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ private DeleteDataStreamAction() {
102102
*/
103103
@PublicApi(since = "1.0.0")
104104
public static class Request extends ClusterManagerNodeRequest<Request> implements IndicesRequest.Replaceable {
105+
// TODO: How we should implement the interface TransportIndicesResolvingAction
106+
// - should we return just the data stream names or the backing indices?
105107

106108
private String[] names;
107109

server/src/main/java/org/opensearch/action/admin/indices/mapping/put/TransportAutoPutMappingAction.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
* @opensearch.internal
5757
*/
5858
public class TransportAutoPutMappingAction extends TransportClusterManagerNodeAction<PutMappingRequest, AcknowledgedResponse> {
59+
// TODO: Q do we need here extensions related to TransportIndicesResolvingAction
60+
// implementation may relay on TransportPutMappingAction
5961

6062
private final MetadataMappingService metadataMappingService;
6163

@@ -102,7 +104,7 @@ protected void doExecute(Task task, PutMappingRequest request, ActionListener<Ac
102104

103105
@Override
104106
protected ClusterBlockException checkBlock(PutMappingRequest request, ClusterState state) {
105-
String[] indices = new String[] { request.getConcreteIndex().getName() };
107+
String[] indices = new String[] { request.getConcreteIndex().getName() }; // todo this should be a result of resolveIndices method
106108
return state.blocks().indicesBlockedException(ClusterBlockLevel.METADATA_WRITE, indices);
107109
}
108110

server/src/main/java/org/opensearch/action/admin/indices/resolve/ResolveIndexAction.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,11 @@ public int hashCode() {
498498
* @opensearch.internal
499499
*/
500500
public static class TransportAction extends HandledTransportAction<Request, Response> {
501+
// TODO: TransportIndicesResolvingAction
502+
// to implement the interface we need to first execute the action or return index all
503+
// how we should treat data stream here.
504+
// check how security plugin handles this
505+
// try to execute the action in the resolveIndices method
501506

502507
private final ThreadPool threadPool;
503508
private final ClusterService clusterService;

server/src/main/java/org/opensearch/action/admin/indices/tiering/TransportHotToWarmTieringAction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
public class TransportHotToWarmTieringAction extends TransportClusterManagerNodeAction<TieringIndexRequest, HotToWarmTieringResponse> implements
4545
TransportIndicesResolvingAction<TieringIndexRequest> {
4646

47+
// TODO: implementation of TransportIndicesResolvingAction should be simple here
48+
4749
private static final Logger logger = LogManager.getLogger(TransportHotToWarmTieringAction.class);
4850
private final ClusterInfoService clusterInfoService;
4951
private final DiskThresholdSettings diskThresholdSettings;

server/src/main/java/org/opensearch/action/admin/indices/view/SearchViewAction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ private SearchViewAction() {
4646
*/
4747
@ExperimentalApi
4848
public static class Request extends SearchRequest {
49+
// TODO: How we should handle the interface TransportIndicesResolvingAction here?]
50+
// ignore if this does not work with non admnin user
4951

5052
private final String view;
5153

0 commit comments

Comments
 (0)