if (state == NULL) return;
/* don't allow for too many redirects */
- if (state->redirect_count++ == CTDB_MAX_REDIRECT) {
+ if ((++state->redirect_count) % CTDB_MAX_REDIRECT == 0) {
c->dmaster = ctdb_lmaster(ctdb, &state->call.key);
+ if (state->redirect_count > ctdb->status.max_redirect_count) {
+ ctdb->status.max_redirect_count = state->redirect_count;
+ }
}
/* send it off again */
uint32_t pending_calls;
uint32_t lockwait_calls;
uint32_t pending_lockwait_calls;
+ uint32_t max_redirect_count;
double max_call_latency;
double max_lockwait_latency;
};
printf(" pending_calls %u\n", s->pending_calls);
printf(" lockwait_calls %u\n", s->lockwait_calls);
printf(" pending_lockwait_calls %u\n", s->pending_lockwait_calls);
+ printf(" max_redirect_count %u\n", s->max_redirect_count);
printf(" max_call_latency %.6f seconds\n", s->max_call_latency);
printf(" max_lockwait_latency %.6f seconds\n", s->max_lockwait_latency);
}