Commit 037c5f1
committed
fix: subscribe to org store before checking sync status in syncOrganizationMeta
Mirrors the subscribe-first pattern established in #1600 af06a65 (for
governance sync) and 6d41b71 (for reconcileOrganization).
Without subscribe-first, the getDataLayerStoreSyncStatus pre-check added
to syncOrganizationMeta has a permanent-skip-loop failure mode: if the
DataLayer node has no record of an org store (e.g. after a DataLayer DB
reset), the status check returns falsy, the loop iteration skips the
org, and no subsequent run ever subscribes — the org's metadata stops
syncing forever.
Also adds a falsy-return guard on subscribeToStoreOnDataLayer: the
wrapper in src/datalayer/persistance.js returns false (without throwing)
on the common failure paths (no storeId, getSubscriptions RPC failure).
Without the falsy check, a datalayer-unreachable failure would slip past
the try/catch and produce a misleading "not yet synced" log.
Applies to both V1 Organization.syncOrganizationMeta and V2
OrganizationsV2.syncOrganizationMeta.1 parent 9be287e commit 037c5f1
2 files changed
Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1358 | 1358 | | |
1359 | 1359 | | |
1360 | 1360 | | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
1361 | 1386 | | |
1362 | 1387 | | |
1363 | 1388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2086 | 2086 | | |
2087 | 2087 | | |
2088 | 2088 | | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
2089 | 2114 | | |
2090 | 2115 | | |
2091 | 2116 | | |
| |||
0 commit comments