Commit f23d73e
committed
RefDirectory#refreshPathToLooseRef: also refresh loose ref itself
We observed that newly generated Gerrit auth tokens weren't visible on
all pods in an HA deployment of k8s-gerrit.
I debugged resolving loose user refs with core.trustStat = after_open
and found that we refresh the attributes of all the directories above a
loose ref by opening an inputstream but we don't do this on the
loose ref itself. It looks like this could cause the issue we observed.
In the example I debugged it was the user ref refs/users/00/10000000 and
I found that the attributes of the directories
refs/
refs/users/
refs/users/00
were refreshed but the loose ref itself
refs/users/00/10000000
was not refreshed.
Fix this by also opening the ref's file itself if refreshing its parent
directories succeeded.
Change-Id: I37aaca2a1f448ca9a1caa325a0c18952cc0231211 parent a17c4aa commit f23d73e
1 file changed
Lines changed: 11 additions & 1 deletion
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1320 | 1320 | | |
1321 | 1321 | | |
1322 | 1322 | | |
| 1323 | + | |
1323 | 1324 | | |
1324 | 1325 | | |
1325 | 1326 | | |
| |||
1328 | 1329 | | |
1329 | 1330 | | |
1330 | 1331 | | |
1331 | | - | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
1332 | 1342 | | |
1333 | 1343 | | |
1334 | 1344 | | |
| |||
0 commit comments