Skip to content

Commit 3cc8886

Browse files
committed
Merge branch 'main' into feature/sandbox-rejection
Signed-off-by: Kaushal Kumar <[email protected]>
2 parents 5629506 + e146f13 commit 3cc8886

File tree

78 files changed

+4540
-626
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4540
-626
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2323
- [Workload Management] QueryGroup resource tracking framework changes ([#13897](https://github.com/opensearch-project/OpenSearch/pull/13897))
2424
- Support filtering on a large list encoded by bitmap ([#14774](https://github.com/opensearch-project/OpenSearch/pull/14774))
2525
- Add slice execution listeners to SearchOperationListener interface ([#15153](https://github.com/opensearch-project/OpenSearch/pull/15153))
26+
- Make balanced shards allocator timebound ([#15239](https://github.com/opensearch-project/OpenSearch/pull/15239))
2627
- Add allowlist setting for ingest-geoip and ingest-useragent ([#15325](https://github.com/opensearch-project/OpenSearch/pull/15325))
2728
- Adding access to noSubMatches and noOverlappingMatches in Hyphenation ([#13895](https://github.com/opensearch-project/OpenSearch/pull/13895))
2829
- Add support for index level max slice count setting for concurrent segment search ([#15336](https://github.com/opensearch-project/OpenSearch/pull/15336))
@@ -31,6 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3132
- Add concurrent search support for Derived Fields ([#15326](https://github.com/opensearch-project/OpenSearch/pull/15326))
3233
- [Workload Management] Add query group stats constructs ([#15343](https://github.com/opensearch-project/OpenSearch/pull/15343)))
3334
- Add runAs to Subject interface and introduce IdentityAwarePlugin extension point ([#14630](https://github.com/opensearch-project/OpenSearch/pull/14630))
35+
- Optimize NodeIndicesStats output behind flag ([#14454](https://github.com/opensearch-project/OpenSearch/pull/14454))
3436
- [Workload Management] Add rejection logic for co-ordinator and shard level requests ([#15428](https://github.com/opensearch-project/OpenSearch/pull/15428)))
3537

3638
### Dependencies

plugins/transport-reactor-netty4/src/main/java/org/opensearch/http/reactor/netty4/ReactorNetty4HttpChunk.java

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,31 @@
88

99
package org.opensearch.http.reactor.netty4;
1010

11+
import org.opensearch.core.common.bytes.BytesArray;
1112
import org.opensearch.core.common.bytes.BytesReference;
1213
import org.opensearch.http.HttpChunk;
13-
import org.opensearch.transport.reactor.netty4.Netty4Utils;
14-
15-
import java.util.concurrent.atomic.AtomicBoolean;
1614

1715
import io.netty.buffer.ByteBuf;
1816

1917
class ReactorNetty4HttpChunk implements HttpChunk {
20-
private final AtomicBoolean released;
21-
private final boolean pooled;
22-
private final ByteBuf content;
18+
private final BytesArray content;
2319
private final boolean last;
2420

25-
ReactorNetty4HttpChunk(ByteBuf content, boolean last) {
26-
this.content = content;
27-
this.pooled = true;
28-
this.released = new AtomicBoolean(false);
21+
ReactorNetty4HttpChunk(ByteBuf buf, boolean last) {
22+
// Since the chunks could be batched and processing could be delayed, we are copying the content here
23+
final byte[] content = new byte[buf.readableBytes()];
24+
buf.readBytes(content);
25+
this.content = new BytesArray(content);
2926
this.last = last;
3027
}
3128

3229
@Override
3330
public BytesReference content() {
34-
assert released.get() == false;
35-
return Netty4Utils.toBytesReference(content);
31+
return content;
3632
}
3733

3834
@Override
39-
public void close() {
40-
if (pooled && released.compareAndSet(false, true)) {
41-
content.release();
42-
}
43-
}
35+
public void close() {}
4436

4537
@Override
4638
public boolean isLast() {

plugins/transport-reactor-netty4/src/main/java/org/opensearch/http/reactor/netty4/ReactorNetty4StreamingHttpChannel.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public void receiveChunk(HttpChunk message) {
103103
}
104104
} catch (final Exception ex) {
105105
producer.error(ex);
106+
} finally {
106107
message.close();
107108
}
108109
}

plugins/transport-reactor-netty4/src/main/java/org/opensearch/http/reactor/netty4/ReactorNetty4StreamingRequestConsumer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void subscribe(Subscriber<? super HttpContent> s) {
4444
}
4545

4646
HttpChunk createChunk(HttpContent chunk, boolean last) {
47-
return new ReactorNetty4HttpChunk(chunk.copy().content().retain(), last);
47+
return new ReactorNetty4HttpChunk(chunk.content(), last);
4848
}
4949

5050
StreamingHttpChannel httpChannel() {

rest-api-spec/src/main/resources/rest-api-spec/test/cluster.put_settings/10_basic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585
"Test set invalid search backpressure mode":
8686

8787
- skip:
88-
version: "- 2.99.99"
89-
reason: "Parsing and validation of SearchBackpressureMode does not exist in versions < 3.0"
88+
version: "- 2.8.99"
89+
reason: "Fixed in 2.9.0"
9090

9191
- do:
9292
catch: bad_request

0 commit comments

Comments
 (0)