@@ -291,7 +291,8 @@ static apr_status_t create_worker_reuse(proxy_server_conf *conf, const char *ptr
291291 helper = * helper_ptr ;
292292 if (helper -> index == -1 ) {
293293 /* We are going to reuse a removed one */
294- ap_log_error (APLOG_MARK , APLOG_DEBUG , 0 , server , "create_worker_reuse: reusing removed worker for %s" , url );
294+ ap_log_error (APLOG_MARK , APLOG_DEBUG , 0 , server , "create_worker_reuse: reusing removed worker (%d) for %s" ,
295+ node -> mess .id , url );
295296 return APR_SUCCESS ;
296297 }
297298
@@ -504,7 +505,7 @@ static apr_status_t create_worker(proxy_server_conf *conf, proxy_balancer *balan
504505 }
505506
506507 /* No, it does not exist, so we will create a new one.
507- * Note that the ap_proxy_get_worker and ap_proxy_define_worker aren't symetrical , and
508+ * Note that the ap_proxy_get_worker and ap_proxy_define_worker aren't symmetrical , and
508509 * this leaks via the conf->pool
509510 */
510511 ap_log_error (APLOG_MARK , APLOG_DEBUG , 0 , server , "create_worker: worker for %s Will create %d!!!" , url ,
@@ -797,13 +798,15 @@ static proxy_worker *get_worker_from_id_stat(const proxy_server_conf *conf, int
797798 for (j = 0 ; j < balancer -> workers -> nelts ; j ++ , ptrw = ptrw + sizew ) {
798799 proxy_worker * * worker = (proxy_worker * * )ptrw ;
799800 proxy_cluster_helper * helper = (proxy_cluster_helper * )(* worker )-> context ;
801+
800802 if ((* worker )-> s == stat && helper -> index == id ) {
801803 if (is_worker_empty (* worker )) {
802804 return NULL ;
803- } else {
804- return * worker ;
805805 }
806+
807+ return * worker ;
806808 }
809+
807810 if (helper -> index == id ) {
808811 unpair_worker_node ((* worker )-> s , node );
809812 helper -> shared -> index = -1 ;
@@ -1836,9 +1839,12 @@ static int proxy_node_isup(request_rec *r, int id, int load)
18361839 char * ptr ;
18371840
18381841 if (node_storage -> read_node (id , & node ) != APR_SUCCESS ) {
1842+ ap_log_error (APLOG_MARK , APLOG_DEBUG , 0 , r -> server , "proxy_cluster_isup: Can't read node with id %d." , id );
18391843 return HTTP_INTERNAL_SERVER_ERROR ;
18401844 }
18411845 if (node -> mess .remove ) {
1846+ ap_log_error (APLOG_MARK , APLOG_DEBUG , 0 , r -> server ,
1847+ "proxy_cluster_isup: Node with id %d is marked for removal." , id );
18421848 return HTTP_INTERNAL_SERVER_ERROR ;
18431849 }
18441850
0 commit comments