From 538f757cbe506ee02e838949996d204e5478bcbe Mon Sep 17 00:00:00 2001 From: Justin James Date: Wed, 10 Jul 2024 16:45:13 -0400 Subject: [PATCH] [2205] Code review 2 --- .../irods/private/s3_resource/multipart_shared_data.hpp | 4 ++-- s3_resource/src/s3_operations.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/s3_resource/include/irods/private/s3_resource/multipart_shared_data.hpp b/s3_resource/include/irods/private/s3_resource/multipart_shared_data.hpp index 34815a1..1c286a9 100644 --- a/s3_resource/include/irods/private/s3_resource/multipart_shared_data.hpp +++ b/s3_resource/include/irods/private/s3_resource/multipart_shared_data.hpp @@ -39,7 +39,7 @@ namespace irods_s3 int threads_remaining_to_close; int number_of_threads; int ref_count; - }; -} + }; // struct multipart_shared_data +} // namespace irods_s3 #endif // IRODS_S3_RESOURCE_MULTIPART_SHARED_DATA_HPP diff --git a/s3_resource/src/s3_operations.cpp b/s3_resource/src/s3_operations.cpp index 8e4cc5c..6fced55 100644 --- a/s3_resource/src/s3_operations.cpp +++ b/s3_resource/src/s3_operations.cpp @@ -78,7 +78,7 @@ namespace irods_s3 { // must have enough space for the memory algorithm and reserved area but there is // no way of knowing the size for these. It is stated that 100*sizeof(void*) would // be enough. - inline static const std::int64_t SHMEM_SIZE{100*sizeof(void*) + sizeof(multipart_shared_data) }; + inline static constexpr std::int64_t SHMEM_SIZE{100*sizeof(void*) + sizeof(multipart_shared_data) }; namespace log = irods::experimental::log; using logger = log::logger; @@ -203,7 +203,7 @@ namespace irods_s3 { SHMEM_SIZE}; // wrapping this in an atomic_exec so only one thread/process for a specific data object is executed at a time - std::string func(__FUNCTION__); + std::string func(__func__); auto ret_value = shm_obj.atomic_exec([&number_of_threads, &data_size, &oprType, &_ctx, thread_id, file_obj, func](auto& data) { oprType = -1; @@ -266,7 +266,7 @@ namespace irods_s3 { // first try to get requested number of threads, data size, and oprType from L1desc // Note: On a replication from an s3 src within a replication node, there are two entries for the // replica - one for PUT and one for REPL_DEST. During the initial PUT there is only one - // entry. To see of we are doing the PUT or REPL, look for the last entry on the list. + // entry. To see if we are doing the PUT or REPL, look for the last entry on the list. bool found = false; for (int i = 0; i < NUM_L1_DESC; ++i) { if (L1desc[i].inuseFlag) { @@ -1125,7 +1125,7 @@ namespace irods_s3 { irods::error result = s3_transport_ptr->get_error(); - // Decrement the remaining to close counter in shared memory. + // Decrement the threads_remaining_to_close counter in shared memory. // Not necessary for GET_OPR as the shared memory is not created in that instance. if (irods_s3::oprType != GET_OPR) {