You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Data field of attachment records is described as length-prefixed bytes. I think we should split it into two fields: Data size and Data.
This does not affect the layout of binary data, but would require a breaking change to SDKs. The reason for the change is supporting streaming writes of attachments. When writing an attachment from a stream, the length needs to be written prior to the stream body. It is not in general possible to know the length of a stream until the whole thing has been read (into the output file), which means backfilling the length would require a backwards seek.
Rather than relying on a seekable writer, we should have the data length supplied up-front in the attachment type supplied to WriteAttachment, and instead rely on the user to fetch it beforehand through some mechanism. For the typical case of attaching files read off disk this will be easy to do.
The text was updated successfully, but these errors were encountered:
Currently the
Data
field of attachment records is described as length-prefixed bytes. I think we should split it into two fields: Data size and Data.This does not affect the layout of binary data, but would require a breaking change to SDKs. The reason for the change is supporting streaming writes of attachments. When writing an attachment from a stream, the length needs to be written prior to the stream body. It is not in general possible to know the length of a stream until the whole thing has been read (into the output file), which means backfilling the length would require a backwards seek.
Rather than relying on a seekable writer, we should have the data length supplied up-front in the attachment type supplied to WriteAttachment, and instead rely on the user to fetch it beforehand through some mechanism. For the typical case of attaching files read off disk this will be easy to do.
The text was updated successfully, but these errors were encountered: