[BUG] PageBlobWriteStream advances stream position twice during write #14606
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
Storage
Storage Service (Queues, Blobs, Files)
Describe the bug
When a write-stream for a
CloudPageBlob
is created withOpenWrite()
and data is written to theStorageWriteStream
the stream's position is internally incremented twice. The two additions happen: 1. in the base classStorageWriterStream
here and in 2. the derivedPageBlobWriteStream
here.Expected behavior
The number of bytes written should be added only to the stream position 1x and not 2x for each write.
What is the actual behavior?
The reported stream position after a write is too high (the offset is added twice, see source code references above).
To Reproduce
PageBlobWriteStream
object viaCloudPageBlob.OpenWrite()
Position
propertyPosition
property again and observe that it now is 1024 higher than beforeEnvironment:
The text was updated successfully, but these errors were encountered: