File tree 1 file changed +11
-1
lines changed
src/connector/src/source/kinesis/source
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ use std::time::Duration;
16
16
17
17
use anyhow:: { anyhow, Result } ;
18
18
use async_trait:: async_trait;
19
- use aws_sdk_kinesis:: error:: { DisplayErrorContext , SdkError } ;
19
+ use aws_sdk_kinesis:: error:: { DisplayErrorContext , ProvideErrorMetadata , SdkError } ;
20
20
use aws_sdk_kinesis:: operation:: get_records:: { GetRecordsError , GetRecordsOutput } ;
21
21
use aws_sdk_kinesis:: primitives:: DateTime ;
22
22
use aws_sdk_kinesis:: types:: ShardIteratorType ;
@@ -188,6 +188,16 @@ impl CommonSplitReader for KinesisSplitReader {
188
188
self . new_shard_iter ( ) . await ?;
189
189
continue ;
190
190
}
191
+ Err ( e) if e. code ( ) == Some ( "InternalFailure" ) => {
192
+ tracing:: warn!(
193
+ "stream {:?} shard {:?} met internal failure, retrying" ,
194
+ self . stream_name,
195
+ self . shard_id
196
+ ) ;
197
+ self . new_shard_iter ( ) . await ?;
198
+ tokio:: time:: sleep ( Duration :: from_millis ( 200 ) ) . await ;
199
+ continue ;
200
+ }
191
201
Err ( e) => {
192
202
let error_msg = format ! (
193
203
"Kinesis got a unhandled error: {:?}, stream {:?}, shard {:?}" ,
You can’t perform that action at this time.
0 commit comments