Make Use Of "authoritative" APIs Optional

Bug #2012402 reported by Bill Erickson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Committed
Wishlist
Unassigned

Bug Description

Evergreen 3.10 / Wishlist

List discussion: http://list.evergreen-ils.org/pipermail/evergreen-dev/2023-March/000466.html

Evergreen's "authoritative" APIs are useful in scenarios where Evergreen may read from multiple replicated databases. In practice, this does not happen so much anymore.

The goal of this bug is to make the use of authoritative API's optional in Evergreen, disabled by default. The change will affect ".authoritative" registered APIs and use of the "authoritative" flag in the Angular pcrud service.

Changed in evergreen:
status: New → Confirmed
Revision history for this message
Bill Erickson (berick) wrote :

A branch:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp2012402-authoritative-optional

Two main things to look for when testing and the setting is disabled:

1. There should be practically zero open-ils.pcrud.transaction.begin / open-ils.pcrud.transaction.rollback calls in the activity log.

2. Authoritative methods should not be wrapped in open-ils.cstore.transaction.begin / open-ils.cstore.transaction.rollback calls in the osrfsys logs.

E.g.

srfsh# request open-ils.actor open-ils.actor.user.opac.vital_stats.authoritative "$AUTHTOKEN" 1

--

Includes release notes.

tags: added: pullrequest
Changed in evergreen:
assignee: Bill Erickson (berick) → nobody
Revision history for this message
Galen Charlton (gmc) wrote :

I'm curious - why the client-side escape hatch to override the new setting?

Revision history for this message
Galen Charlton (gmc) wrote :

Ah, never mind me - the verb "use" in "opensrf.open-ils.system.use_authoritative" was making me think setter, not getter.

Changed in evergreen:
milestone: 3.11-beta → 3.12-beta
Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbergja)
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Thanks, Bill! Looks good to me. Cherry-picked for inclusion in 3.12, along with a smol follow-up commit to keep the angular tests happy.

Changed in evergreen:
assignee: Jane Sandberg (sandbergja) → nobody
status: Confirmed → Fix Committed
tags: added: signedoff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.