Commit 568bdaf
fix(server): resolve refresh connector data outside the rotation transaction
Rotate invokes the freshIdentity callback from inside
UpdateRefreshToken's transaction, and the SQLite storage pools a
single connection (SetMaxOpenConns(1)), so the GetOfflineSessions
read issued by refreshConnectorData from that callback waits forever
for the connection the transaction already holds. Every later token
request then queues behind the exhausted pool: a single refresh
grant wedges /token permanently while /healthz keeps passing.
Restore the pre-refactor behavior of resolving the connector data
before rotation starts, gated on the same userIdent condition the
callback used.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: laoshanxi <178029200@qq.com>1 parent ab64ed7 commit 568bdaf
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
111 | 122 | | |
112 | 123 | | |
113 | 124 | | |
114 | 125 | | |
115 | | - | |
116 | | - | |
117 | | - | |
| 126 | + | |
| 127 | + | |
118 | 128 | | |
119 | 129 | | |
120 | 130 | | |
| |||
0 commit comments