You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SystemError(hdfs_handle, "Failure when determining user connection limit", result);
934
+
returnresult;
935
+
}
936
+
if (-1== (user_lock_count=dumb_sem_timedwait(usem, user_transfer_limit, 60))) {
937
+
if (errno==ETIMEDOUT) {
938
+
globus_gfs_log_message(GLOBUS_GFS_LOG_INFO, "Failing transfer for %s due to user connection limit of %d.\n", hdfs_handle->username, user_transfer_limit);
939
+
char*failure_msg= (char*)globus_malloc(1024);
940
+
snprintf(failure_msg, 1024, "Server over the user connection limit of %d", user_transfer_limit);
941
+
failure_msg[1023] ='\0';
942
+
GenericError(hdfs_handle, failure_msg, result);
943
+
globus_free(failure_msg);
944
+
} else {
945
+
SystemError(hdfs_handle, "Failed to check user connection semaphore", result);
946
+
}
947
+
returnresult;
948
+
}
949
+
// NOTE: We now purposely leak the semaphore. It will be automatically closed when
SystemError(hdfs_handle, "Failure when determining global connection limit", result);
961
+
returnresult;
962
+
}
963
+
if (-1== (global_lock_count=dumb_sem_timedwait(gsem, transfer_limit, 60))) {
964
+
if (errno==ETIMEDOUT) {
965
+
globus_gfs_log_message(GLOBUS_GFS_LOG_INFO, "Failing transfer for %s due to global connection limit of %d (user has %d transfers).\n", hdfs_handle->username, transfer_limit, user_lock_count);
966
+
char*failure_msg= (char*)globus_malloc(1024);
967
+
snprintf(failure_msg, 1024, "Server over the global connection limit of %d (user has %d transfers)", transfer_limit, user_lock_count);
968
+
failure_msg[1023] ='\0';
969
+
GenericError(hdfs_handle, failure_msg, result);
970
+
globus_free(failure_msg);
971
+
} else {
972
+
SystemError(hdfs_handle, "Failed to check global connection semaphore", result);
973
+
}
974
+
returnresult;
975
+
}
976
+
// NOTE: We now purposely leak the semaphore. It will be automatically closed when
977
+
// the server process finishes this connection.
978
+
}
979
+
if ((transfer_limit>0) || (user_transfer_limit>0)) {
980
+
globus_gfs_log_message(GLOBUS_GFS_LOG_INFO, "Proceeding with transfer; user %s has %d active transfers (limit %d); server has %d active transfers (limit %d).\n", hdfs_handle->username, user_lock_count, user_transfer_limit, global_lock_count, transfer_limit);
0 commit comments