Skip to content

Commit

Permalink
[2205] Code review 2
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinKyleJames committed Jul 10, 2024
1 parent 775e26f commit 538f757
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions s3_resource/src/s3_operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<s3_plugin_logging_category>;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {

Expand Down

0 comments on commit 538f757

Please sign in to comment.