In the metadata persistence logic we failed to override the bulk write method on the FilterOutputStream resulting in all the writes to it running byte-by-byte in a loop adding a large number of bounds checks needlessly.
This commit is contained in:
parent
bdd7347bbf
commit
212ce22d15
|
@ -814,6 +814,12 @@ public class PersistedClusterStateService {
|
|||
final ReleasableBytesStreamOutput releasableBytesStreamOutput = new ReleasableBytesStreamOutput(bigArrays);
|
||||
try {
|
||||
final FilterOutputStream outputStream = new FilterOutputStream(releasableBytesStreamOutput) {
|
||||
|
||||
@Override
|
||||
public void write(byte[] b, int off, int len) throws IOException {
|
||||
out.write(b, off, len);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
// closing the XContentBuilder should not release the bytes yet
|
||||
|
|
Loading…
Reference in New Issue