lixueclaire commented on code in PR #571:
URL: https://github.com/apache/incubator-graphar/pull/571#discussion_r1703447212
##########
cpp/src/graphar/filesystem.h:
##########
@@ -153,4 +153,15 @@ class FileSystem {
Result<std::shared_ptr<FileSystem>> FileSystemFromUriOrPath(
const std::string& uri, std::string* out_path = nullptr);
+/**
+ * @brief Shutdown the S3 APIs.
+ *
+ * This function should be called before the program exits to ensure that
+ * all S3 resources are properly released.
+ *
+ * This function calls arrow:fs::FinalizeS3() internally.
+ *
+ */
+Status FinalizeS3();
Review Comment:
> I feel a little confused about this API design:
>
> * users are asked to Finalize S3 **explicitly**, while this filesystem is
not initialized by a function `InitS3()`, but got from a function
`FileSystemFromUriOrPath` **implicitly**.
> * IMO, why not put the finalizing code in `~FileSystem()`?
Agree, putting it in `~FileSystem()` may be more intuitive.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]