Use Aurora writer for reads if max_lag_ms isn't specified

This solves the issue described in issue #3522

It is a side effect of a mistake in commit 5336e72f1c
pull/3586/head
René Cannaò 5 years ago
parent d0f6ba3503
commit 38c5a76d0e

@ -2843,7 +2843,7 @@ MySrvC *MyHGC::get_random_MySrvC(char * gtid_uuid, uint64_t gtid_trxid, int max_
}
}
}
if (max_lag_ms) { // we are using AWS Aurora, as this logic is implemented only here
if (max_lag_ms > 0) { // we are using AWS Aurora, as this logic is implemented only here
unsigned int min_num_replicas = sess->thread->variables.aurora_max_lag_ms_only_read_from_replicas;
if (min_num_replicas) {
if (num_candidates >= min_num_replicas) { // there are at least N replicas

Loading…
Cancel
Save