@@ -38,7 +38,6 @@ struct aws_s3_meta_request_work {
3838 struct aws_s3_meta_request * meta_request ;
3939};
4040
41- static const bool s_log_client_stats = false;
4241static const enum aws_log_level s_log_level_client_stats = AWS_LL_INFO ;
4342
4443static const uint32_t s_s3_max_request_count_per_connection = 100 ;
@@ -1200,6 +1199,10 @@ static void s_s3_client_process_work_default(struct aws_s3_client *client) {
12001199 /*******************/
12011200 /* Step 1: Move everything into thread local memory. */
12021201 /*******************/
1202+ AWS_LOGF_DEBUG (
1203+ AWS_LS_S3_CLIENT ,
1204+ "id=%p s_s3_client_process_work_default - Moving relevant synced_data into threaded_data." ,
1205+ (void * )client );
12031206 aws_s3_client_lock_synced_data (client );
12041207
12051208 client_active = client -> synced_data .active != 0 ;
@@ -1222,6 +1225,9 @@ static void s_s3_client_process_work_default(struct aws_s3_client *client) {
12221225 /*******************/
12231226 /* Step 2: Process any meta request work. */
12241227 /*******************/
1228+ AWS_LOGF_DEBUG (
1229+ AWS_LS_S3_CLIENT , "id=%p s_s3_client_process_work_default - Processing any new meta requests." , (void * )client );
1230+
12251231 while (!aws_linked_list_empty (& meta_request_work_list )) {
12261232 struct aws_linked_list_node * node = aws_linked_list_pop_back (& meta_request_work_list );
12271233 struct aws_s3_meta_request_work * meta_request_work =
@@ -1248,6 +1254,11 @@ static void s_s3_client_process_work_default(struct aws_s3_client *client) {
12481254 /* If we have an invalid endpoint, then finish up all of the meta requests. */
12491255 /* TODO once we have multiple bucket support, this will should only stop meta requests attached to bad endpoints. */
12501256 if (invalid_endpoint ) {
1257+ AWS_LOGF_DEBUG (
1258+ AWS_LS_S3_CLIENT ,
1259+ "id=%p s_s3_client_process_work_default - Updating meta requests with 'no-endpoint-connections' flag." ,
1260+ (void * )client );
1261+
12511262 while (!aws_linked_list_empty (& client -> threaded_data .meta_requests )) {
12521263 struct aws_linked_list_node * node = aws_linked_list_begin (& client -> threaded_data .meta_requests );
12531264 struct aws_s3_meta_request * meta_request =
@@ -1273,14 +1284,22 @@ static void s_s3_client_process_work_default(struct aws_s3_client *client) {
12731284 /* We first assign requests to connections with the "conservative" flag. This will tell each meta request that
12741285 * connections can still potentially be shared between meta requests. (ie: an individual meta request shouldn't
12751286 * necessarily try to issue as many requests as it can, unless it's known that that won't impact performance.) */
1287+ AWS_LOGF_DEBUG (
1288+ AWS_LS_S3_CLIENT ,
1289+ "id=%p s_s3_client_process_work_default - Updating meta requests and connections with 'conservative' flag." ,
1290+ (void * )client );
12761291 s_s3_client_assign_requests_to_connections_threaded (
12771292 client , client_active , AWS_S3_META_REQUEST_UPDATE_FLAG_CONSERVATIVE );
12781293
12791294 /* If we still have connections left over, then don't pass any flags, indicating to meta requests that any logic for
12801295 * better sharing connections between meta requests can now be ignored. */
1296+ AWS_LOGF_DEBUG (
1297+ AWS_LS_S3_CLIENT ,
1298+ "id=%p s_s3_client_process_work_default - Updating meta requests and connections without 'conservative' flag." ,
1299+ (void * )client );
12811300 s_s3_client_assign_requests_to_connections_threaded (client , client_active , 0 );
12821301
1283- if ( s_log_client_stats ) {
1302+ {
12841303 uint32_t num_idle_connections = 0 ;
12851304
12861305 for (struct aws_linked_list_node * node = aws_linked_list_begin (& client -> threaded_data .idle_vip_connections );
@@ -1300,9 +1319,9 @@ static void s_s3_client_process_work_default(struct aws_s3_client *client) {
13001319
13011320 AWS_LOGF (
13021321 s_log_level_client_stats ,
1303- AWS_LS_S3_CLIENT ,
1304- "CLIENT-STATS-LOGGING Requests-in-flight(approx/exact):%d/%d Requests-network:%d Requests-waiting:%d "
1305- "Requests-streaming:%d Idle-connections:%d Allocated-connections:%d Active-connections:%d" ,
1322+ AWS_LS_S3_CLIENT_STATS ,
1323+ "Requests-in-flight(approx/exact):%d/%d Requests-network:%d Requests-waiting:%d Requests-streaming :%d "
1324+ "Idle-connections:%d Allocated-connections:%d Active-connections:%d" ,
13061325 total_approx_requests ,
13071326 client -> threaded_data .num_requests_in_flight ,
13081327 num_requests_network_io ,
0 commit comments