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
Copy file name to clipboardExpand all lines: core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/async/NonRetryableSubAsyncRequestBody.java
+7-10Lines changed: 7 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -62,11 +62,11 @@ public Optional<Long> contentLength() {
62
62
63
63
publicvoidsend(ByteBufferdata) {
64
64
log.debug(() -> String.format("Sending bytebuffer %s to part %d", data, partNumber));
65
-
intlength = data.remaining();
65
+
longlength = data.remaining();
66
66
bufferedLength += length;
67
-
onNumBytesReceived.accept((long) length);
67
+
onNumBytesReceived.accept(length);
68
68
delegate.send(data).whenComplete((r, t) -> {
69
-
onNumBytesConsumed.accept((long) length);
69
+
onNumBytesConsumed.accept(length);
70
70
if (t != null) {
71
71
error(t);
72
72
}
@@ -92,11 +92,6 @@ public long receivedBytesLength() {
92
92
returnbufferedLength;
93
93
}
94
94
95
-
@Override
96
-
publicbooleancontentLengthKnown() {
97
-
returncontentLengthKnown;
98
-
}
99
-
100
95
@Override
101
96
publicintpartNumber() {
102
97
returnpartNumber;
@@ -113,8 +108,10 @@ public void subscribe(Subscriber<? super ByteBuffer> s) {
113
108
} else {
114
109
s.onSubscribe(newNoopSubscription(s));
115
110
s.onError(NonRetryableException.create(
116
-
"A retry was attempted, but the provided source AsyncRequestBody does not "
117
-
+ "support splitting to retryable AsyncRequestBody. Consider using BufferedSplittableAsyncRequestBody."));
111
+
"Multiple subscriptions detected. This could happen due to a retry attempt. The AsyncRequestBody implementation"
112
+
+ " provided does not support splitting to retryable/resubscribable AsyncRequestBody. If you need retry "
113
+
+ "capability or multiple subscriptions, consider using BufferedSplittableAsyncRequestBody to wrap your "
0 commit comments