Skip to content

Commit 5b16055

Browse files
Add effective max model memory limit to ML info (#4814) (#4821)
Relates: elastic/elasticsearch#55529, #4803 Co-authored-by: Russ Cam <russ.cam@elastic.co>
1 parent 964327c commit 5b16055

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/Nest/XPack/MachineLearning/MachineLearningInfo/MachineLearningInfoResponse.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,11 @@ public class Limits
6262
{
6363
[DataMember(Name = "max_model_memory_limit")]
6464
public string MaxModelMemoryLimit { get; internal set; }
65+
66+
/// <summary>
67+
/// Available in Elasticsearch 7.8.0+
68+
/// </summary>
69+
[DataMember(Name = "effective_max_model_memory_limit")]
70+
public string EffectiveMaxModelMemoryLimit { get; internal set; }
6571
}
6672
}

tests/Tests/XPack/MachineLearning/MachineLearningInfo/MachineLearningInfoApiTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ protected override void ExpectResponse(MachineLearningInfoResponse response)
5656
analyzer.Tokenizer.Should().Be("ml_classic");
5757
analyzer.Filter.Should().NotBeNullOrEmpty();
5858
}
59+
60+
if (TestClient.Configuration.InRange(">=7.8.0"))
61+
response.Limits.EffectiveMaxModelMemoryLimit.Should().NotBeNullOrEmpty();
5962
}
6063
}
6164
}

0 commit comments

Comments
 (0)