Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into updates_with_new_inte…
Browse files Browse the repository at this point in the history
…rface
  • Loading branch information
pgomulka committed Jul 10, 2024
2 parents ef25032 + 3bd192c commit 8035222
Show file tree
Hide file tree
Showing 149 changed files with 5,308 additions and 1,980 deletions.
20 changes: 0 additions & 20 deletions .buildkite/pipelines/pull-request/bwc-snapshots-windows.yml

This file was deleted.

6 changes: 6 additions & 0 deletions docs/changelog/107047.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 107047
summary: "Search/Mapping: KnnVectorQueryBuilder support for allowUnmappedFields"
area: Search
type: bug
issues:
- 106846
5 changes: 5 additions & 0 deletions docs/changelog/110527.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 110527
summary: "ESQL: Add boolean support to Max and Min aggs"
area: ES|QL
type: feature
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/110651.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 110651
summary: "Remove `default_field: message` from metrics index templates"
area: Data streams
type: enhancement
issues: []
5 changes: 5 additions & 0 deletions docs/changelog/110666.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 110666
summary: Removing the use of Stream::peek from `GeoIpDownloader::cleanDatabases`
area: Ingest Node
type: bug
issues: []
2 changes: 1 addition & 1 deletion docs/reference/esql/functions/description/max.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/esql/functions/description/min.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 17 additions & 5 deletions docs/reference/esql/functions/kibana/definition/max.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 17 additions & 5 deletions docs/reference/esql/functions/kibana/definition/min.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/esql/functions/kibana/docs/max.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/esql/functions/kibana/docs/min.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/esql/functions/parameters/max.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/esql/functions/parameters/min.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/esql/functions/signature/max.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/reference/esql/functions/signature/min.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/reference/esql/functions/types/max.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion docs/reference/esql/functions/types/min.asciidoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions docs/reference/search/multi-search-template-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ PUT _scripts/my-search-template
},
"from": "{{from}}",
"size": "{{size}}"
},
"params": {
"query_string": "My query string"
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions docs/reference/search/render-search-template-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ PUT _scripts/my-search-template
},
"from": "{{from}}",
"size": "{{size}}"
},
"params": {
"query_string": "My query string"
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions docs/reference/search/search-template-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ PUT _scripts/my-search-template
},
"from": "{{from}}",
"size": "{{size}}"
},
"params": {
"query_string": "My query string"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ PUT _scripts/my-search-template
},
"from": "{{from}}",
"size": "{{size}}"
},
"params": {
"query_string": "My query string"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.Structure.ByReference;
import com.sun.jna.WString;
import com.sun.jna.win32.StdCallLibrary;

Expand Down Expand Up @@ -98,6 +99,38 @@ public long Type() {
}
}

/**
* Basic limit information for a job object
*
* https://msdn.microsoft.com/en-us/library/windows/desktop/ms684147%28v=vs.85%29.aspx
*/
public static class JnaJobObjectBasicLimitInformation extends Structure implements ByReference, JobObjectBasicLimitInformation {
public byte[] _ignore1 = new byte[16];
public int LimitFlags;
public byte[] _ignore2 = new byte[20];
public int ActiveProcessLimit;
public byte[] _ignore3 = new byte[20];

public JnaJobObjectBasicLimitInformation() {
super(8);
}

@Override
protected List<String> getFieldOrder() {
return List.of("_ignore1", "LimitFlags", "_ignore2", "ActiveProcessLimit", "_ignore3");
}

@Override
public void setLimitFlags(int v) {
LimitFlags = v;
}

@Override
public void setActiveProcessLimit(int v) {
ActiveProcessLimit = v;
}
}

/**
* JNA adaptation of {@link ConsoleCtrlHandler}
*/
Expand Down Expand Up @@ -128,6 +161,20 @@ private interface NativeFunctions extends StdCallLibrary {
int GetShortPathNameW(WString lpszLongPath, char[] lpszShortPath, int cchBuffer);

boolean SetConsoleCtrlHandler(StdCallLibrary.StdCallCallback handler, boolean add);

Pointer CreateJobObjectW(Pointer jobAttributes, String name);

boolean AssignProcessToJobObject(Pointer job, Pointer process);

boolean QueryInformationJobObject(
Pointer job,
int infoClass,
JnaJobObjectBasicLimitInformation info,
int infoLength,
Pointer returnLength
);

boolean SetInformationJobObject(Pointer job, int infoClass, JnaJobObjectBasicLimitInformation info, int infoLength);
}

private final NativeFunctions functions;
Expand Down Expand Up @@ -197,4 +244,42 @@ public boolean SetConsoleCtrlHandler(ConsoleCtrlHandler handler, boolean add) {
consoleCtrlHandlerCallback = new NativeHandlerCallback(handler);
return functions.SetConsoleCtrlHandler(consoleCtrlHandlerCallback, true);
}

@Override
public Handle CreateJobObjectW() {
return new JnaHandle(functions.CreateJobObjectW(null, null));
}

@Override
public boolean AssignProcessToJobObject(Handle job, Handle process) {
assert job instanceof JnaHandle;
assert process instanceof JnaHandle;
var jnaJob = (JnaHandle) job;
var jnaProcess = (JnaHandle) process;
return functions.AssignProcessToJobObject(jnaJob.pointer, jnaProcess.pointer);
}

@Override
public JobObjectBasicLimitInformation newJobObjectBasicLimitInformation() {
return new JnaJobObjectBasicLimitInformation();
}

@Override
public boolean QueryInformationJobObject(Handle job, int infoClass, JobObjectBasicLimitInformation info) {
assert job instanceof JnaHandle;
assert info instanceof JnaJobObjectBasicLimitInformation;
var jnaJob = (JnaHandle) job;
var jnaInfo = (JnaJobObjectBasicLimitInformation) info;
var ret = functions.QueryInformationJobObject(jnaJob.pointer, infoClass, jnaInfo, jnaInfo.size(), null);
return ret;
}

@Override
public boolean SetInformationJobObject(Handle job, int infoClass, JobObjectBasicLimitInformation info) {
assert job instanceof JnaHandle;
assert info instanceof JnaJobObjectBasicLimitInformation;
var jnaJob = (JnaHandle) job;
var jnaInfo = (JnaJobObjectBasicLimitInformation) info;
return functions.SetInformationJobObject(jnaJob.pointer, infoClass, jnaInfo, jnaInfo.size());
}
}
Loading

0 comments on commit 8035222

Please sign in to comment.