Skip to content

Ensure indexing_data CCR requests are compressed #79413

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

Merged
merged 2 commits into from
Oct 19, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void handleException(TransportException exp) {
}
}

static class ProxyRequest<T extends TransportRequest> extends TransportRequest {
static class ProxyRequest<T extends TransportRequest> extends TransportRequest implements RawIndexingDataTransportRequest {
final T wrapped;
final DiscoveryNode targetNode;

Expand All @@ -120,6 +120,14 @@ public void writeTo(StreamOutput out) throws IOException {
targetNode.writeTo(out);
wrapped.writeTo(out);
}

@Override
public boolean isRawIndexingData() {
if (wrapped instanceof RawIndexingDataTransportRequest) {
return ((RawIndexingDataTransportRequest) wrapped).isRawIndexingData();
}
return false;
}
}

private static class CancellableProxyRequest<T extends TransportRequest> extends ProxyRequest<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.index.translog.Translog;
import org.elasticsearch.transport.RawIndexingDataTransportRequest;

import java.io.IOException;
import java.util.List;

public final class BulkShardOperationsRequest extends ReplicatedWriteRequest<BulkShardOperationsRequest> {
public final class BulkShardOperationsRequest extends ReplicatedWriteRequest<BulkShardOperationsRequest>
implements RawIndexingDataTransportRequest {

private final String historyUUID;
private final List<Translog.Operation> operations;
Expand Down