Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current implementation accepts storage URIs in the following form: 's3://[<access_key_id>:<secret_access_key>@]<bucket_name>[.]/'. In case '' is not specified explicitly, it will be auto-detected from the location of the '<bucket_name>' bucket.
As AWS S3 does not have a direct way to append data to an existin object, we use the following strategy for resuming stream operations.
Re-designed 'binsrv::s3_storage_backend' class. Introduced internal 'aws_context' class that follows the 'pimpl' idiom, so that the main class include file 'binsrv/s3_storage_backend.hpp' does not depemnd on any '<aws/*>' headers.
'binsrv::filesystem_backend_storage' class now explicitly specifies required combinations of the 'std::ios_base::[in | out | binary | trunc | app]' flags in full for all internal 'std::ifstream' / 'std::ofstream' / 'std::fstream' objects.
'binsrv::storage' class destructor now tries to call 'backend_->close_stream();' in order to flush stream state to the storage backend in case of normal / exceptional shutdown.
'binsrv::basic_storage_backend' class extended with additional method 'is_stream_open()' indication whether the object is in a state between 'open_stream()' and 'close_stream()' calls.
'open_stream()' method in the 'binsrv::basic_storage_backend' class now accepts one additional parameter indicating an intent to either create or append a storage stream explicitly.
Similarly to 'easymysql::core_error' added 'binsrv::s3_error' exception class with its own 's3_category()' error category ('std::error_category').
Similarly to 'easymysql::raise_core_error_from_connection()' added 'raise_s3_error_from_outcome()' helper function which throws an exception with error info extracted from 'Aws::S3Crt::S3CrtError' (an error-path alternative of almost any 'S3Crt' call outcome).
'easymysql::raise_core_error_from_connection()' helper function extended with additional 'user_message' parameter.
Main application now prints 'successfully shut down' to the log at the end of execution.
'binsrv' MTR test case extended with additional logic that allows to use both 'file://' and 's3://' as backend storage providers (the choice depends on whether 'MTR_BINSRV_AWS_ACCESS_KEY_ID' / 'MTR_BINSRV_AWS_SECRET_ACCESS_KEY' / 'MTR_BINSRV_AWS_S3_BUCKET' environment variables are set or not).
Added extra precautions for accidentally leaking AWS credentials - we now temporarily disable MySQL general query log to make sure that 'AWS_ACCESS_KEY_ID' / 'MTR_BINSRV_AWS_SECRET_ACCESS_KEY' will not appear in the recorded SQL queries.
Added 'diff_with_storage_object.inc' MTR include file that can compare a local file with an object from backend storage (either 'file' or 's3').
Added more instructions on how to make 'binsrv' MTR test case use AWS S3 as a storage backend in 'mtr/README'.
Added '.clang-format' file to 'mtr' directory to exclude MTR test cases and include files from being processed by 'clang-format'.