Source:
<code>public PutMessageFormatInputStream(StoreKey key, BlobProperties blobProperties, ByteBuffer userMetadata, InputStream blobStream, long streamSize, BlobType blobType) throws MessageFormatException { int headerSize = MessageFormatRecord.MessageHeader_Format_V1.getHeaderSize(); int blobPropertiesRecordSize = MessageFormatRecord.BlobProperties_Format_V1.getBlobPropertiesRecordSize(blobProperties); int userMetadataSize = MessageFormatRecord.UserMetadata_Format_V1.getUserMetadataSize(userMetadata); <START> long blobSize = MessageFormatRecord.Blob_Format_V2.getBlobRecordSize(streamSize); <END> buffer = ByteBuffer.allocate(headerSize + key.sizeInBytes() + blobPropertiesRecordSize + userMetadataSize + (int) (blobSize - streamSize - MessageFormatRecord.Crc_Size)); MessageFormatRecord.MessageHeader_Format_V1 .serializeHeader(buffer, blobPropertiesRecordSize + userMetadataSize + blobSize, headerSize + key.sizeInBytes(), MessageFormatRecord.Message_Header_Invalid_Relative_Offset, headerSize + key.sizeInBytes() + blobPropertiesRecordSize, headerSize + key.sizeInBytes() + blobPropertiesRecordSize + userMetadataSize); buffer.put(key.toBytes()); MessageFormatRecord.BlobProperties_Format_V1.serializeBlobPropertiesRecord(buffer, blobProperties); MessageFormatRecord.UserMetadata_Format_V1.serializeUserMetadataRecord(buffer, userMetadata); int bufferBlobStart = buffer.position(); MessageFormatRecord.Blob_Format_V2.serializePartialBlobRecord(buffer, streamSize, blobType); Crc32 crc = new Crc32(); crc.update(buffer.array(), bufferBlobStart, buffer.position() - bufferBlobStart); stream = new CrcInputStream(crc, blobStream); streamLength = streamSize; messageLength = buffer.capacity() + streamLength + MessageFormatRecord.Crc_Size; buffer.flip(); }</code><technical_language>This is big this persisted information supported forever. of write in latest version eventually, start writing in V2 straight away. this controlled a temporary config parameter eventually remove. rollout testing - enable in test cluster do testing need to. I foresee other message format change for supporting large objects, in EI Prod, enable put implementation is done</technical_language>

Target:
public PutMessageFormatInputStream(StoreKey key, BlobProperties blobProperties, ByteBuffer userMetadata, InputStream blobStream, long streamSize, BlobType blobType) throws MessageFormatException { int headerSize = MessageFormatRecord.MessageHeader_Format_V1.getHeaderSize(); int blobPropertiesRecordSize = MessageFormatRecord.BlobProperties_Format_V1.getBlobPropertiesRecordSize(blobProperties); int userMetadataSize = MessageFormatRecord.UserMetadata_Format_V1.getUserMetadataSize(userMetadata); long blobSize = MessageFormatRecord.Blob_Format_V1.getBlobRecordSize(streamSize); buffer = ByteBuffer.allocate(headerSize + key.sizeInBytes() + blobPropertiesRecordSize + userMetadataSize + (int) (blobSize - streamSize - MessageFormatRecord.Crc_Size)); MessageFormatRecord.MessageHeader_Format_V1 .serializeHeader(buffer, blobPropertiesRecordSize + userMetadataSize + blobSize, headerSize + key.sizeInBytes(), MessageFormatRecord.Message_Header_Invalid_Relative_Offset, headerSize + key.sizeInBytes() + blobPropertiesRecordSize, headerSize + key.sizeInBytes() + blobPropertiesRecordSize + userMetadataSize); buffer.put(key.toBytes()); MessageFormatRecord.BlobProperties_Format_V1.serializeBlobPropertiesRecord(buffer, blobProperties); MessageFormatRecord.UserMetadata_Format_V1.serializeUserMetadataRecord(buffer, userMetadata); int bufferBlobStart = buffer.position(); MessageFormatRecord.Blob_Format_V1.serializePartialBlobRecord(buffer, streamSize); Crc32 crc = new Crc32(); crc.update(buffer.array(), bufferBlobStart, buffer.position() - bufferBlobStart); stream = new CrcInputStream(crc, blobStream); streamLength = streamSize; messageLength = buffer.capacity() + streamLength + MessageFormatRecord.Crc_Size; buffer.flip(); }