Commit 899bfb4
Fix incomplete data detection to handle all decoder exceptions
Extended the incomplete data detection logic to catch ALL types of insufficient data errors from the decoder, not just "not long enough" messages.
The decoder throws different incomplete data errors:
- "Content not long enough" - when parsing message header (13 bytes needed)
- "Segment header is incomplete" - when parsing segment header (10 bytes needed)
- "Segment footer is incomplete" - when parsing segment footer (8 bytes for CRC64)
- "Message footer is incomplete" - when parsing message footer (8 bytes for CRC64)
Previous fix only caught "not long enough", causing failures when interruptions occurred while parsing segments/footers.
Updated exception handling to check for both:
- "not long enough" (header parsing)
- "is incomplete" (segment/footer parsing)
This ensures partial data is preserved in pending buffer for ALL incomplete data scenarios, allowing smart retry to properly accumulate bytes across interruptions regardless of where in the message structure the interruption occurs.
Addresses the "Unexpected segment number" error that occurred when segments were split across retries.
Co-authored-by: gunjansingh-msft <[email protected]>1 parent ec7de83 commit 899bfb4
File tree
1 file changed
+2
-1
lines changed- sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/policy
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
0 commit comments