Failure to update/write in a [read only] replica reporting environment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen Quick Reports |
New
|
Undecided
|
Unassigned |
Bug Description
When Quick Reports is looking for the database credentials to connect in opensrf.xml it looks at the <database> stanza to get its connection info (host, port, dbname, user, password).
This is fine unless your opensrf.xml has different <database> and <state_store> entries. This can often be the case in read-only replica environments (Postgres streaming) where the <state_store> information points to the production database for write/updates and relies on the <database> information to run the SELECT queries for the reports.
Not relying on opensrf.xml and passing the QR_PGSQL_
openilsConfig.
[snip]
$xml->default-
...
...
openilsConfig.
$xml->default-
...
...
I'm not sure if this would fix the reasoning behind having replica databases for reporting -- to ensure rogue reports can't bring down the system and to shift reporting load of the main db.
Is there a way I'm missing to include the <state_store> production db info for tasks that require updates and otherwise rely on the <database> (replica) connection?