Retry the member load every authenticated request makes

FixMediaService
Shipped
September 5, 2026 at 7:49 PM UTC
Author
Kamo
Commit
a0ab32c

AuthHelper.getCurrentMember was the single most common casualty of a Yugabyte catalog bump in this service — eight of the conflicts logged across both pods in one six-hour window started on this line. It loads through memberRepository directly rather than MemberService, so it never inherited the retry that read already had, and a schema change surfaced as sporadic 401s and failed chat calls. requireMember carries the annotation too, and that is the part worth pausing on: it reaches getCurrentMember by SELF-INVOCATION, which never touches the proxy. Annotating only getCurrentMember would have covered direct callers and missed every caller that goes through requireMember, which is most of them — while looking, in the diff and in the class, exactly like a fix. The test pins both; removing the annotation from requireMember alone fails it. ChatEmailNoticeService already had a retry loop, for a producer that has not committed yet. A catalog bump is not that, and it was consuming NATS redelivery attempts meant for the other condition. The DB retry wraps transactionTemplate.execute so each attempt begins a genuinely new transaction; SessionNotReadyException is not transient by TransientDbRetry's reckoning, so it still falls through to the loop that owns it.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing