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

Implement the cat.pit_segments and cat.segment_replication operations #527

Merged
merged 3 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
restore-keys: |
${{ runner.os }}-nuget-

- run: "./build.sh integrate ${{ matrix.version }} readonly,writable random:test_only_one --report"
- run: "./build.sh integrate ${{ matrix.version }} readonly,replicatedreadonly,writable random:test_only_one --report"
name: Integration Tests
working-directory: client

Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
knn_plugin: true
plugins_output_directory: ${{ env.OPENSEARCH_PLUGINS_DIRECTORY }}

- run: "./build.sh integrate $OPENSEARCH_VERSION readonly,writable random:test_only_one --report"
- run: "./build.sh integrate $OPENSEARCH_VERSION readonly,replicatedreadonly,writable random:test_only_one --report"
name: Integration Tests
working-directory: client
env:
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Removed support for the `net461` target ([#256](https://github.com/opensearch-project/opensearch-net/pull/256))
- Fixed naming of `ClusterManagerTimeout` and `MasterTimeout` properties from `*TimeSpanout` in the low-level client ([#332](https://github.com/opensearch-project/opensearch-net/pull/332))

### Added
- Added support for the `Cat.PitSegments` and `Cat.SegmentReplication` APIs ([#527](https://github.com/opensearch-project/opensearch-net/pull/527))

### Removed
- Removed the `Features` API which is not supported by OpenSearch from the low-level client ([#331](https://github.com/opensearch-project/opensearch-net/pull/331))
- Removed the deprecated low-level `IndexTemplateV2` APIs in favour of the `ComposableIndexTemplate` APIs ([#437](https://github.com/opensearch-project/opensearch-net/pull/437))

### Fixed
- Fix `HttpConnection.ConvertHttpMethod` to support `Patch` method ([#489](https://github.com/opensearch-project/opensearch-net/pull/489))
- Fixed `HttpConnection.ConvertHttpMethod` to support `Patch` method ([#489](https://github.com/opensearch-project/opensearch-net/pull/489))
- Fixed `IEnumerable<int?>` property mapping. ([#503](https://github.com/opensearch-project/opensearch-net/pull/503))

### Dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,12 @@ public IDisposable Start(IConsoleLineHandler writer, TimeSpan waitForStarted)
OnBeforeStart();

var subscriptions = new Subscriptions();
foreach (var node in Nodes) subscriptions.Add(node.SubscribeLines(writer));

var waitHandles = Nodes.Select(w => w.StartedHandle).ToArray();
if (!WaitHandle.WaitAll(waitHandles, waitForStarted))
foreach (var node in Nodes)
{
subscriptions.Add(node.SubscribeLines(writer));
if (node.WaitForStarted(waitForStarted)) continue;

var nodeExceptions = Nodes.Select(n => n.LastSeenException).Where(e => e != null).ToList();
writer?.WriteError(
$"{{{GetType().Name}.{nameof(Start)}}} cluster did not start after {waitForStarted}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ private static StartArguments StartArgs(NodeConfiguration config)

private static Dictionary<string, string> EnvVars(NodeConfiguration config)
{
var environmentVariables = new Dictionary<string, string> { { "OPENSEARCH_JAVA_OPTS", "-Xms1g -Xmx1g" } };
var javaOpts = new List<string> { "-Xms1g", "-Xmx1g" };

var environmentVariables = new Dictionary<string, string> { { "OPENSEARCH_JAVA_OPTS", string.Join(" ", javaOpts) } };

if (!string.IsNullOrWhiteSpace(config.FileSystem.ConfigPath))
environmentVariables.Add(config.FileSystem.ConfigEnvironmentVariableName, config.FileSystem.ConfigPath);

Expand Down
23 changes: 1 addition & 22 deletions src/ApiGenerator/Configuration/CodeConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,7 @@ public static class CodeConfiguration
new("{create,delete}_pit"),
new("{delete,get}_all_pits"),

new("cat.aliases"),
new("cat.allocation"),
new("cat.cluster_manager"),
new("cat.count"),
new("cat.fielddata"),
new("cat.health"),
new("cat.help"),
new("cat.indices"),
new("cat.master"),
new("cat.nodeattrs"),
new("cat.nodes"),
new("cat.pending_tasks"),
new("cat.plugins"),
new("cat.recovery"),
new("cat.repositories"),
new("cat.segments"),
new("cat.shards"),
new("cat.snapshots"),
new("cat.tasks"),
new("cat.templates"),
new("cat.thread_pool"),

new("cat.*"),
new("cluster.*"),
new("dangling_indices.*"),

Expand Down
Loading
Loading