Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete pit service layer changes #8

Open
wants to merge 30 commits into
base: createpitservice
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a8be024
Create pit service layer changes
bharath-techie Jul 15, 2022
8a8f708
Create pit service layer changes
bharath-techie Jul 15, 2022
f20dbdc
Delete pit service layer changes
bharath-techie Jul 15, 2022
8f673c5
Merge branch 'createpitservice' of github.com:bharath-techie/OpenSear…
bharath-techie Jul 15, 2022
97c4f77
changing to consistent action names
bharath-techie Jul 15, 2022
9497923
Merge branch 'createpitservice' of github.com:bharath-techie/OpenSear…
bharath-techie Jul 19, 2022
8fcc25c
Addressing review comments
bharath-techie Jul 19, 2022
ab3f0d4
Merge branch 'createpitservice' of github.com:bharath-techie/OpenSear…
bharath-techie Jul 19, 2022
55eb86d
Create pit service layer changes (#3921)
bharath-techie Jul 19, 2022
41d342d
Resolving conflicts
bharath-techie Jul 19, 2022
25bb645
Addressing comments
bharath-techie Jul 20, 2022
4466a1f
[Segment Replication] Fixing flaky test failure happening for testSha…
Rishikesh1159 Jul 20, 2022
1510b94
Rename and deprecate public methods that contains 'master' in the nam…
Jul 20, 2022
29adf2a
Upgrading Joda version (#3935)
saratvemulapalli Jul 20, 2022
717cd66
Addressing comments
bharath-techie Jul 21, 2022
8b5a10c
Fix possible flaky test for testBeforeIndexShardClosed_CancelsOngoing…
Rishikesh1159 Jul 21, 2022
bb593d6
[Segment Replication] Checkpoint Replay on Replica Shard (#3658)
Rishikesh1159 Jul 21, 2022
b08a2b8
Make HybridDirectory MMAP Extensions Configurable (#3837)
mattweber Jul 21, 2022
ccf1d15
Deprecate public methods and variables that contain 'master' terminol…
Jul 22, 2022
f4db20b
Addressing review comment
bharath-techie Jul 22, 2022
197909c
[Segment Replication] Wire up segment replication with peer recovery …
mch2 Jul 22, 2022
931813f
Adds a new parameter, max_analyzer_offset, for the highlighter (#3893)
hauck-jvsh Jul 22, 2022
5db75c1
Deprecate public methods and variables that contain 'master' terminol…
Jul 22, 2022
1c787e8
Parallelize stale blobs deletion during snapshot delete (#3796)
piyushdaftary Jul 22, 2022
efde8c5
Add guidelines for code contributions (#3976)
adnapibar Jul 23, 2022
b24b02f
Use bash in systemd-entrypoint shebang (#4008)
shdubsh Jul 26, 2022
3f08013
Addressing review comment - adding tests to test concurrency
bharath-techie Jul 25, 2022
f76fa24
Addressing review comment - adding tests to test concurrency
bharath-techie Jul 25, 2022
d870dd5
Merge branch 'main' of https://github.com/opensearch-project/OpenSear…
bharath-techie Jul 26, 2022
ae618ff
Merge branch 'deletepitservice' of github.com:bharath-techie/OpenSear…
bharath-techie Jul 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ If you would like to contribute to the documentation, please do so in the [docum

As with other types of contributions, the first step is to [**open an issue on GitHub**](https://github.com/opensearch-project/OpenSearch/issues/new/choose). Opening an issue before you make changes makes sure that someone else isn't already working on that particular problem. It also lets us all work together to find the right approach before you spend a bunch of time on a PR. So again, when in doubt, open an issue.

Additionally, here are a few guidelines to help you decide whether a particular feature should be included in OpenSearch.

**Is your feature important to most users of OpenSearch?**

If you believe that a feature is going to fulfill a need for most users of OpenSearch, then it belongs in OpenSearch. However, we don't want every feature built into the core server. If the feature requires additional permissions or brings in extra dependencies it should instead be included as a module in core.

**Is your feature a common dependency across multiple plugins?**

Does this feature contain functionality that cuts across multiple plugins? If so, this most likely belongs in OpenSearch as a core module or plugin.

Once you've opened an issue, check out our [Developer Guide](./DEVELOPER_GUIDE.md) for instructions on how to get started.

## Developer Certificate of Origin
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ asm = 9.3
jna = 5.5.0

netty = 4.1.79.Final
joda = 2.10.12
joda = 2.10.13

# client dependencies
httpclient = 4.5.13
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static Request putComponentTemplate(PutComponentTemplateRequest putComponentTemp
.build();
Request request = new Request(HttpPut.METHOD_NAME, endpoint);
RequestConverters.Params params = new RequestConverters.Params();
params.withClusterManagerTimeout(putComponentTemplateRequest.masterNodeTimeout());
params.withClusterManagerTimeout(putComponentTemplateRequest.clusterManagerNodeTimeout());
if (putComponentTemplateRequest.create()) {
params.putParam("create", Boolean.TRUE.toString());
}
Expand All @@ -124,7 +124,7 @@ static Request getComponentTemplates(GetComponentTemplatesRequest getComponentTe
final Request request = new Request(HttpGet.METHOD_NAME, endpoint);
final RequestConverters.Params params = new RequestConverters.Params();
params.withLocal(getComponentTemplatesRequest.isLocal());
params.withClusterManagerTimeout(getComponentTemplatesRequest.getMasterNodeTimeout());
params.withClusterManagerTimeout(getComponentTemplatesRequest.getClusterManagerNodeTimeout());
request.addParameters(params.asMap());
return request;
}
Expand All @@ -136,7 +136,7 @@ static Request componentTemplatesExist(ComponentTemplatesExistRequest componentT
final Request request = new Request(HttpHead.METHOD_NAME, endpoint);
final RequestConverters.Params params = new RequestConverters.Params();
params.withLocal(componentTemplatesRequest.isLocal());
params.withClusterManagerTimeout(componentTemplatesRequest.getMasterNodeTimeout());
params.withClusterManagerTimeout(componentTemplatesRequest.getClusterManagerNodeTimeout());
request.addParameters(params.asMap());
return request;
}
Expand All @@ -146,7 +146,7 @@ static Request deleteComponentTemplate(DeleteComponentTemplateRequest deleteComp
String endpoint = new RequestConverters.EndpointBuilder().addPathPartAsIs("_component_template").addPathPart(name).build();
Request request = new Request(HttpDelete.METHOD_NAME, endpoint);
RequestConverters.Params params = new RequestConverters.Params();
params.withClusterManagerTimeout(deleteComponentTemplateRequest.masterNodeTimeout());
params.withClusterManagerTimeout(deleteComponentTemplateRequest.clusterManagerNodeTimeout());
request.addParameters(params.asMap());
return request;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static Request closeIndex(CloseIndexRequest closeIndexRequest) {

RequestConverters.Params parameters = new RequestConverters.Params();
parameters.withTimeout(closeIndexRequest.timeout());
parameters.withClusterManagerTimeout(closeIndexRequest.masterNodeTimeout());
parameters.withClusterManagerTimeout(closeIndexRequest.clusterManagerNodeTimeout());
parameters.withIndicesOptions(closeIndexRequest.indicesOptions());
request.addParameters(parameters.asMap());
return request;
Expand All @@ -156,7 +156,7 @@ static Request createIndex(CreateIndexRequest createIndexRequest) throws IOExcep

RequestConverters.Params parameters = new RequestConverters.Params();
parameters.withTimeout(createIndexRequest.timeout());
parameters.withClusterManagerTimeout(createIndexRequest.masterNodeTimeout());
parameters.withClusterManagerTimeout(createIndexRequest.clusterManagerNodeTimeout());
parameters.withWaitForActiveShards(createIndexRequest.waitForActiveShards());
request.addParameters(parameters.asMap());
request.setEntity(RequestConverters.createEntity(createIndexRequest, RequestConverters.REQUEST_BODY_CONTENT_TYPE));
Expand All @@ -179,7 +179,7 @@ static Request putMapping(PutMappingRequest putMappingRequest) throws IOExceptio

RequestConverters.Params parameters = new RequestConverters.Params();
parameters.withTimeout(putMappingRequest.timeout());
parameters.withClusterManagerTimeout(putMappingRequest.masterNodeTimeout());
parameters.withClusterManagerTimeout(putMappingRequest.clusterManagerNodeTimeout());
parameters.withIndicesOptions(putMappingRequest.indicesOptions());
request.addParameters(parameters.asMap());
request.setEntity(RequestConverters.createEntity(putMappingRequest, RequestConverters.REQUEST_BODY_CONTENT_TYPE));
Expand All @@ -192,7 +192,7 @@ static Request getMappings(GetMappingsRequest getMappingsRequest) {
Request request = new Request(HttpGet.METHOD_NAME, RequestConverters.endpoint(indices, "_mapping"));

RequestConverters.Params parameters = new RequestConverters.Params();
parameters.withClusterManagerTimeout(getMappingsRequest.masterNodeTimeout());
parameters.withClusterManagerTimeout(getMappingsRequest.clusterManagerNodeTimeout());
parameters.withIndicesOptions(getMappingsRequest.indicesOptions());
parameters.withLocal(getMappingsRequest.local());
request.addParameters(parameters.asMap());
Expand Down Expand Up @@ -332,7 +332,7 @@ private static Request resize(ResizeRequest resizeRequest, ResizeType type) thro

RequestConverters.Params params = new RequestConverters.Params();
params.withTimeout(resizeRequest.timeout());
params.withClusterManagerTimeout(resizeRequest.masterNodeTimeout());
params.withClusterManagerTimeout(resizeRequest.clusterManagerNodeTimeout());
params.withWaitForActiveShards(resizeRequest.getWaitForActiveShards());
request.addParameters(params.asMap());
request.setEntity(RequestConverters.createEntity(resizeRequest, RequestConverters.REQUEST_BODY_CONTENT_TYPE));
Expand Down Expand Up @@ -365,7 +365,7 @@ static Request rollover(RolloverRequest rolloverRequest) throws IOException {

RequestConverters.Params params = new RequestConverters.Params();
params.withTimeout(rolloverRequest.timeout());
params.withClusterManagerTimeout(rolloverRequest.masterNodeTimeout());
params.withClusterManagerTimeout(rolloverRequest.clusterManagerNodeTimeout());
params.withWaitForActiveShards(rolloverRequest.getCreateIndexRequest().waitForActiveShards());
if (rolloverRequest.isDryRun()) {
params.putParam("dry_run", Boolean.TRUE.toString());
Expand Down Expand Up @@ -402,7 +402,7 @@ static Request getIndex(GetIndexRequest getIndexRequest) {
params.withLocal(getIndexRequest.local());
params.withIncludeDefaults(getIndexRequest.includeDefaults());
params.withHuman(getIndexRequest.humanReadable());
params.withClusterManagerTimeout(getIndexRequest.masterNodeTimeout());
params.withClusterManagerTimeout(getIndexRequest.clusterManagerNodeTimeout());
request.addParameters(params.asMap());
return request;
}
Expand Down Expand Up @@ -461,7 +461,7 @@ static Request putIndexTemplate(PutComposableIndexTemplateRequest putIndexTempla
.build();
Request request = new Request(HttpPut.METHOD_NAME, endpoint);
RequestConverters.Params params = new RequestConverters.Params();
params.withClusterManagerTimeout(putIndexTemplateRequest.masterNodeTimeout());
params.withClusterManagerTimeout(putIndexTemplateRequest.clusterManagerNodeTimeout());
if (putIndexTemplateRequest.create()) {
params.putParam("create", Boolean.TRUE.toString());
}
Expand All @@ -479,7 +479,7 @@ static Request simulateIndexTemplate(SimulateIndexTemplateRequest simulateIndexT
.build();
Request request = new Request(HttpPost.METHOD_NAME, endpoint);
RequestConverters.Params params = new RequestConverters.Params();
params.withClusterManagerTimeout(simulateIndexTemplateRequest.masterNodeTimeout());
params.withClusterManagerTimeout(simulateIndexTemplateRequest.clusterManagerNodeTimeout());
PutComposableIndexTemplateRequest putComposableIndexTemplateRequest = simulateIndexTemplateRequest.indexTemplateV2Request();
if (putComposableIndexTemplateRequest != null) {
if (putComposableIndexTemplateRequest.create()) {
Expand Down Expand Up @@ -529,7 +529,7 @@ static Request getTemplates(GetIndexTemplatesRequest getIndexTemplatesRequest) {
final Request request = new Request(HttpGet.METHOD_NAME, endpoint);
final RequestConverters.Params params = new RequestConverters.Params();
params.withLocal(getIndexTemplatesRequest.isLocal());
params.withClusterManagerTimeout(getIndexTemplatesRequest.getMasterNodeTimeout());
params.withClusterManagerTimeout(getIndexTemplatesRequest.getClusterManagerNodeTimeout());
request.addParameters(params.asMap());
return request;
}
Expand All @@ -541,7 +541,7 @@ static Request getIndexTemplates(GetComposableIndexTemplateRequest getIndexTempl
final Request request = new Request(HttpGet.METHOD_NAME, endpoint);
final RequestConverters.Params params = new RequestConverters.Params();
params.withLocal(getIndexTemplatesRequest.isLocal());
params.withClusterManagerTimeout(getIndexTemplatesRequest.getMasterNodeTimeout());
params.withClusterManagerTimeout(getIndexTemplatesRequest.getClusterManagerNodeTimeout());
request.addParameters(params.asMap());
return request;
}
Expand All @@ -553,7 +553,7 @@ static Request templatesExist(IndexTemplatesExistRequest indexTemplatesExistRequ
final Request request = new Request(HttpHead.METHOD_NAME, endpoint);
final RequestConverters.Params params = new RequestConverters.Params();
params.withLocal(indexTemplatesExistRequest.isLocal());
params.withClusterManagerTimeout(indexTemplatesExistRequest.getMasterNodeTimeout());
params.withClusterManagerTimeout(indexTemplatesExistRequest.getClusterManagerNodeTimeout());
request.addParameters(params.asMap());
return request;
}
Expand All @@ -565,7 +565,7 @@ static Request templatesExist(ComposableIndexTemplateExistRequest indexTemplates
final Request request = new Request(HttpHead.METHOD_NAME, endpoint);
final RequestConverters.Params params = new RequestConverters.Params();
params.withLocal(indexTemplatesExistRequest.isLocal());
params.withClusterManagerTimeout(indexTemplatesExistRequest.getMasterNodeTimeout());
params.withClusterManagerTimeout(indexTemplatesExistRequest.getClusterManagerNodeTimeout());
request.addParameters(params.asMap());
return request;
}
Expand Down Expand Up @@ -597,7 +597,7 @@ static Request deleteIndexTemplate(DeleteComposableIndexTemplateRequest deleteIn
String endpoint = new RequestConverters.EndpointBuilder().addPathPartAsIs("_index_template").addPathPart(name).build();
Request request = new Request(HttpDelete.METHOD_NAME, endpoint);
RequestConverters.Params params = new RequestConverters.Params();
params.withClusterManagerTimeout(deleteIndexTemplateRequest.masterNodeTimeout());
params.withClusterManagerTimeout(deleteIndexTemplateRequest.clusterManagerNodeTimeout());
request.addParameters(params.asMap());
return request;
}
Expand All @@ -610,7 +610,7 @@ static Request deleteAlias(DeleteAliasRequest deleteAliasRequest) {
Request request = new Request(HttpDelete.METHOD_NAME, endpoint);
RequestConverters.Params parameters = new RequestConverters.Params();
parameters.withTimeout(deleteAliasRequest.timeout());
parameters.withClusterManagerTimeout(deleteAliasRequest.masterNodeTimeout());
parameters.withClusterManagerTimeout(deleteAliasRequest.clusterManagerNodeTimeout());
request.addParameters(parameters.asMap());
return request;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@
public abstract class TimedRequest implements Validatable {

public static final TimeValue DEFAULT_ACK_TIMEOUT = timeValueSeconds(30);
public static final TimeValue DEFAULT_MASTER_NODE_TIMEOUT = TimeValue.timeValueSeconds(30);
public static final TimeValue DEFAULT_CLUSTER_MANAGER_NODE_TIMEOUT = TimeValue.timeValueSeconds(30);
/** @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #DEFAULT_CLUSTER_MANAGER_NODE_TIMEOUT} */
@Deprecated
public static final TimeValue DEFAULT_MASTER_NODE_TIMEOUT = DEFAULT_CLUSTER_MANAGER_NODE_TIMEOUT;

private TimeValue timeout = DEFAULT_ACK_TIMEOUT;
private TimeValue clusterManagerTimeout = DEFAULT_MASTER_NODE_TIMEOUT;
private TimeValue clusterManagerTimeout = DEFAULT_CLUSTER_MANAGER_NODE_TIMEOUT;

/**
* Sets the timeout to wait for the all the nodes to acknowledge
Expand All @@ -61,10 +64,20 @@ public void setTimeout(TimeValue timeout) {
* Sets the timeout to connect to the cluster-manager node
* @param clusterManagerTimeout timeout as a {@link TimeValue}
*/
public void setMasterTimeout(TimeValue clusterManagerTimeout) {
public void setClusterManagerTimeout(TimeValue clusterManagerTimeout) {
this.clusterManagerTimeout = clusterManagerTimeout;
}

/**
* Sets the timeout to connect to the cluster-manager node
* @param clusterManagerTimeout timeout as a {@link TimeValue}
* @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #setClusterManagerTimeout(TimeValue)}
*/
@Deprecated
public void setMasterTimeout(TimeValue clusterManagerTimeout) {
setClusterManagerTimeout(clusterManagerTimeout);
}

/**
* Returns the request timeout
*/
Expand All @@ -75,7 +88,16 @@ public TimeValue timeout() {
/**
* Returns the timeout for the request to be completed on the cluster-manager node
*/
public TimeValue masterNodeTimeout() {
public TimeValue clusterManagerNodeTimeout() {
return clusterManagerTimeout;
}

/**
* Returns the timeout for the request to be completed on the cluster-manager node
* @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #clusterManagerNodeTimeout()}
*/
@Deprecated
public TimeValue masterNodeTimeout() {
return clusterManagerNodeTimeout();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class GetComponentTemplatesRequest implements Validatable {

private final String name;

private TimeValue clusterManagerNodeTimeout = TimedRequest.DEFAULT_MASTER_NODE_TIMEOUT;
private TimeValue clusterManagerNodeTimeout = TimedRequest.DEFAULT_CLUSTER_MANAGER_NODE_TIMEOUT;
private boolean local = false;

/**
Expand All @@ -67,17 +67,41 @@ public String name() {
/**
* @return the timeout for waiting for the cluster-manager node to respond
*/
public TimeValue getMasterNodeTimeout() {
public TimeValue getClusterManagerNodeTimeout() {
return clusterManagerNodeTimeout;
}

public void setMasterNodeTimeout(@Nullable TimeValue clusterManagerNodeTimeout) {
/**
* @return the timeout for waiting for the cluster-manager node to respond
* @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #getMasterNodeTimeout()}
*/
@Deprecated
public TimeValue getMasterNodeTimeout() {
return getClusterManagerNodeTimeout();
}

public void setClusterManagerNodeTimeout(@Nullable TimeValue clusterManagerNodeTimeout) {
this.clusterManagerNodeTimeout = clusterManagerNodeTimeout;
}

/** @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #setClusterManagerNodeTimeout(TimeValue)} */
@Deprecated
public void setMasterNodeTimeout(@Nullable TimeValue clusterManagerNodeTimeout) {
setClusterManagerNodeTimeout(clusterManagerNodeTimeout);
}

public void setClusterManagerNodeTimeout(String clusterManagerNodeTimeout) {
final TimeValue timeValue = TimeValue.parseTimeValue(
clusterManagerNodeTimeout,
getClass().getSimpleName() + ".clusterManagerNodeTimeout"
);
setClusterManagerNodeTimeout(timeValue);
}

/** @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #setClusterManagerNodeTimeout(String)} */
@Deprecated
public void setMasterNodeTimeout(String clusterManagerNodeTimeout) {
final TimeValue timeValue = TimeValue.parseTimeValue(clusterManagerNodeTimeout, getClass().getSimpleName() + ".masterNodeTimeout");
setMasterNodeTimeout(timeValue);
setClusterManagerNodeTimeout(clusterManagerNodeTimeout);
}

/**
Expand Down
Loading