Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This module has 1 select query which is fairly slow. If a site has a read-replica (slave) then it would be good to use it. Since the data in the table is relatively static, it seems fine to always use the read replica rather than ever sending the query to the master.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2574273_send_query_read_replica_if_possible-3.patch | 803 bytes | AohRveTPV |
#2 | 2574273_send_query_read_replica_if_possible.patch | 1.26 KB | greggles |
Comments
Comment #2
gregglesI admit that I've never used this feature before, but have just read docs and copied what core does (e.g. in modules/tracker/tracker.pages.inc).
Comment #3
AohRveTPV CreditAttribution: AohRveTPV commentedRemade the patch to not change modes of files.
Seems like a really good use of this feature.
If I understand correctly, it would be possible to temporarily get stale data querying the slave, but I can't think of any major problems this would cause.
Comment #4
gregglesYes, thanks for that cleanup. Not sure what happened there.
Agreed on the impact: could return stale data, but given the nature of the data that doesn't seem like a very big risk.
Comment #5
lahoosascoots CreditAttribution: lahoosascoots commentedsubscribing for future D8 porting reminder