Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.8.1
Description
For each request, we will serialize it to a byte array.
In SerializeUtils#serializeRequest, before serializing the request, it always allocates 32 byte array. It's unnecessary; we can allocate the byte array in the catch code block.
public static byte[] serializeRequest(Request request) { if (request == null || request.getHdr() == null) { return null; } byte[] data = new byte[32]; try { data = Util.marshallTxnEntry(request.getHdr(), request.getTxn(), request.getTxnDigest()); } catch (IOException e) { LOG.error("This really should be impossible", e); } return data; }
Attachments
Issue Links
- links to