[RFC][Lunr] Gravity: add flag to persist MySQL query hint

Review Request #489 — Created Jan. 27, 2017 and discarded — Latest diff uploaded

tardypad
Lunr
mysql_connection_persist_query_hint
lunr

Not really happy with this solution because it might be confusing in its usage in the following scenario for example:
- run_on_master with persist on
- all the following queries are then run on master (as expected)
- run_on_slave with persist off
- next query is run on the slave (as expected)
- following queries are run either on master or slave (not sure if this is expected)

Maybe it is better to keep the run_on_master, run_on_slave,... functions only affecting the next query
And have a separate "global query hint" property management:
- new property global_query_hint with master/slave setter functions
- the query functions would use that global query hint by default unless there is a temporary one set from the run_on_master/slave functions

none

Loading...