View | Details | Raw Unified | Return to bug 61733
Collapse All | Expand All

(-)native/common/jk_lb_worker.c (-3 / +3 lines)
Lines 369-375 Link Here
369
}
369
}
370
370
371
/* Syncing config values to shm */
371
/* Syncing config values to shm */
372
void jk_lb_push(lb_worker_t *p, int locked, jk_logger_t *l)
372
void jk_lb_push(lb_worker_t *p, int locked, int push_all_members, jk_logger_t *l)
373
{
373
{
374
    unsigned int i = 0;
374
    unsigned int i = 0;
375
375
Lines 394-400 Link Here
394
394
395
    for (i = 0; i < p->num_of_workers; i++) {
395
    for (i = 0; i < p->num_of_workers; i++) {
396
        lb_sub_worker_t *w = &p->lb_workers[i];
396
        lb_sub_worker_t *w = &p->lb_workers[i];
397
        if (w->sequence != w->s->h.sequence) {
397
        if (push_all_members == JK_TRUE || w->sequence != w->s->h.sequence) {
398
            jk_worker_t *jw = w->worker;
398
            jk_worker_t *jw = w->worker;
399
            ajp_worker_t *aw = (ajp_worker_t *)jw->worker_private;
399
            ajp_worker_t *aw = (ajp_worker_t *)jw->worker_private;
400
400
Lines 1959-1965 Link Here
1959
    if (p->s->h.sequence == 0) {
1959
    if (p->s->h.sequence == 0) {
1960
        /* Set configuration data to shared memory
1960
        /* Set configuration data to shared memory
1961
         */
1961
         */
1962
        jk_lb_push(p, JK_TRUE, log);
1962
        jk_lb_push(p, JK_TRUE, JK_FALSE, log);
1963
    }
1963
    }
1964
    else {
1964
    else {
1965
        /* Shared memory for this worker is already configured.
1965
        /* Shared memory for this worker is already configured.
(-)native/common/jk_lb_worker.h (-1 / +1 lines)
Lines 219-225 Link Here
219
int jk_lb_get_activation_code(const char *v);
219
int jk_lb_get_activation_code(const char *v);
220
void reset_lb_values(lb_worker_t *p, jk_logger_t *l);
220
void reset_lb_values(lb_worker_t *p, jk_logger_t *l);
221
void jk_lb_pull(lb_worker_t * p, int locked, jk_logger_t *l);
221
void jk_lb_pull(lb_worker_t * p, int locked, jk_logger_t *l);
222
void jk_lb_push(lb_worker_t * p, int locked, jk_logger_t *l);
222
void jk_lb_push(lb_worker_t * p, int locked, int push_all_members, jk_logger_t *l);
223
void update_mult(lb_worker_t * p, jk_logger_t *l);
223
void update_mult(lb_worker_t * p, jk_logger_t *l);
224
224
225
#ifdef __cplusplus
225
#ifdef __cplusplus
(-)native/common/jk_status.c (-8 / +11 lines)
Lines 3350-3356 Link Here
3350
    }
3350
    }
3351
    if (sync_needed == JK_TRUE) {
3351
    if (sync_needed == JK_TRUE) {
3352
        lb->sequence = -1;
3352
        lb->sequence = -1;
3353
        jk_lb_push(lb, JK_TRUE, l);
3353
        jk_lb_push(lb, JK_TRUE, JK_FALSE, l);
3354
    }
3354
    }
3355
}
3355
}
3356
3356
Lines 3640-3645 Link Here
3640
    int i;
3640
    int i;
3641
    int rc = 0;
3641
    int rc = 0;
3642
    unsigned int j;
3642
    unsigned int j;
3643
    int push_all_members = JK_FALSE;
3643
3644
3644
    JK_TRACE_ENTER(l);
3645
    JK_TRACE_ENTER(l);
3645
    if (!attribute) {
3646
    if (!attribute) {
Lines 3887-3898 Link Here
3887
        }
3888
        }
3888
        if (rc == 1)
3889
        if (rc == 1)
3889
            reset_lb_values(lb, l);
3890
            reset_lb_values(lb, l);
3890
        else if (rc == 2)
3891
        else if (rc == 2) {
3891
            /* Recalculate the load multiplicators wrt. lb_factor */
3892
            /* Recalculate the load multiplicators wrt. lb_factor */
3892
            update_mult(lb, l);
3893
            update_mult(lb, l);
3894
            push_all_members = JK_TRUE;
3895
        }
3893
        if (rc) {
3896
        if (rc) {
3894
            lb->sequence = -1;
3897
            lb->sequence = -1;
3895
            jk_lb_push(lb, JK_TRUE, l);
3898
            jk_lb_push(lb, JK_TRUE, push_all_members, l);
3896
        }
3899
        }
3897
    }
3900
    }
3898
    JK_TRACE_EXIT(l);
3901
    JK_TRACE_EXIT(l);
Lines 4395-4410 Link Here
4395
                if (rv & JK_STATUS_NEEDS_ADDR_PUSH) {
4398
                if (rv & JK_STATUS_NEEDS_ADDR_PUSH) {
4396
                    aw->addr_sequence = -1;
4399
                    aw->addr_sequence = -1;
4397
                }
4400
                }
4398
                if (rv & (JK_STATUS_NEEDS_PUSH | JK_STATUS_NEEDS_ADDR_PUSH)) {
4399
                    wr->sequence = -1;
4400
                    lb->sequence = -1;
4401
                    jk_lb_push(lb, JK_TRUE, l);
4402
                }
4403
                if (rv & JK_STATUS_NEEDS_RESET_LB_VALUES)
4401
                if (rv & JK_STATUS_NEEDS_RESET_LB_VALUES)
4404
                    reset_lb_values(lb, l);
4402
                    reset_lb_values(lb, l);
4405
                if (rv & JK_STATUS_NEEDS_UPDATE_MULT)
4403
                if (rv & JK_STATUS_NEEDS_UPDATE_MULT)
4406
                    /* Recalculate the load multiplicators wrt. lb_factor */
4404
                    /* Recalculate the load multiplicators wrt. lb_factor */
4407
                    update_mult(lb, l);
4405
                    update_mult(lb, l);
4406
                if (rv & (JK_STATUS_NEEDS_PUSH | JK_STATUS_NEEDS_ADDR_PUSH)) {
4407
                    wr->sequence = -1;
4408
                    lb->sequence = -1;
4409
                    jk_lb_push(lb, JK_TRUE, rv & JK_STATUS_NEEDS_UPDATE_MULT ? JK_TRUE: JK_FALSE, l);
4410
                }
4408
                if (rc == JK_FALSE) {
4411
                if (rc == JK_FALSE) {
4409
                    jk_log(l, JK_LOG_ERROR,
4412
                    jk_log(l, JK_LOG_ERROR,
4410
                           "Status worker '%s' failed updating sub worker '%s' (at least partially).%s",
4413
                           "Status worker '%s' failed updating sub worker '%s' (at least partially).%s",

Return to bug 61733