Skip to content

Commit 1ce8c01

Browse files
committed
Set version in local transport when serialization exceptions
We added version dependent serialziation in #22703 which triggers a bug in LocalTransport that misses to set the serializatoin version when an exception is serialized. This is only relevant for tests since local transport has by-definition the same version on both ends in production. Closes #22784
1 parent 45aea28 commit 1ce8c01

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/main/java/org/elasticsearch/transport/local/LocalTransportChannel.java

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public void sendResponse(TransportResponse response, TransportResponseOptions op
9494
@Override
9595
public void sendResponse(Exception exception) throws IOException {
9696
BytesStreamOutput stream = new BytesStreamOutput();
97+
stream.setVersion(version);
9798
writeResponseExceptionHeader(stream);
9899
RemoteTransportException tx = new RemoteTransportException(targetTransport.nodeName(),
99100
targetTransport.boundAddress().boundAddresses()[0], action, exception);

0 commit comments

Comments
 (0)