pitrou commented on code in PR #36442:
URL: https://github.com/apache/arrow/pull/36442#discussion_r1251135361
##########
cpp/src/arrow/filesystem/s3fs.cc:
##########
@@ -2581,17 +2773,18 @@ Result<std::shared_ptr<io::OutputStream>>
S3FileSystem::OpenAppendStream(
namespace {
-struct AwsInstance : public ::arrow::internal::Executor::Resource {
+struct AwsInstance {
AwsInstance() : is_initialized_(false), is_finalized_(false) {}
~AwsInstance() { Finalize(/*from_destructor=*/true); }
// Returns true iff the instance was newly initialized with `options`
Result<bool> EnsureInitialized(const S3GlobalOptions& options) {
- bool expected = false;
+ // XXX The individual accesses are atomic but the entire sequence below is
not.
Review Comment:
Note that I don't think this should be a problem _in practice_, as calls to
`EnsureInitialized` and `Finalize` should be serialized at the application
level.
--
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]