Skip to content

Commit

Permalink
sink(ticdc): fix create storage sink (#9244)
Browse files Browse the repository at this point in the history
ref #8772, close #9316
  • Loading branch information
CharlesCheung96 authored Jul 4, 2023
1 parent a0991ca commit 41fda20
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/util/external_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ func GetExternalStorage(
retErr := errors.ErrFailToCreateExternalStorage.Wrap(errors.Trace(err))
return nil, retErr.GenWithStackByArgs("creating ExternalStorage for s3")
}

// Check the connection and ignore the returned bool value, since we don't care if the file exists.
_, err = ret.FileExists(ctx, "test")
if err != nil {
retErr := errors.ErrFailToCreateExternalStorage.Wrap(errors.Trace(err))
return nil, retErr.GenWithStackByArgs("creating ExternalStorage for s3")
}
return ret, nil
}

Expand Down

0 comments on commit 41fda20

Please sign in to comment.