kou commented on code in PR #36437:
URL: https://github.com/apache/arrow/pull/36437#discussion_r1251283717
##########
cpp/src/arrow/filesystem/s3fs.cc:
##########
@@ -398,12 +398,19 @@ namespace {
Status CheckS3Initialized() {
if (!IsS3Initialized()) {
return Status::Invalid(
- "S3 subsystem not initialized; please call InitializeS3() "
+ "S3 subsystem is not initialized; please call InitializeS3() "
"before carrying out any S3-related operation");
}
return Status::OK();
}
+Status CheckS3Finalized() {
Review Comment:
Ah, you're right.
We don't need this and I should have added `Not`...
##########
cpp/src/arrow/filesystem/s3fs.cc:
##########
@@ -2562,6 +2626,8 @@ Result<std::shared_ptr<io::OutputStream>>
S3FileSystem::OpenOutputStream(
ARROW_ASSIGN_OR_RAISE(auto path, S3Path::FromString(s));
RETURN_NOT_OK(ValidateFilePath(path));
+ RETURN_NOT_OK(CheckS3Finalized());
Review Comment:
Yes.
(I chose this position to use non aws-sdk-cpp related codes as much as
possible even after `arrow::fs::FinalizeS3()`. But it may not be important in
most cases.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]