You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(APP): purge removed-org data on orglist reconcile
When ONLY_CADT_SUBSCRIPTIONS removes an organization that is no longer on
the governance orgList, also delete the organization record and all of the
registry data it created, instead of only unsubscribing and retaining the
data. Deletion is unconditional and does not check whether other orgs
reference the data.
- add purgeV2OrganizationData to hard-delete every V2 row owned by an org
(org_uid tables plus project/unit/verification/aef-t1 traced children)
and wire it into OrganizationsV2.deleteAllOrganizationData, which
previously left projects/units/etc orphaned
- rename the reconcile helper to removeOrgsNotInOrgList: unsubscribe (when
still subscribed) then delete; skip home org, governance body, and
PENDING; purge orgs already locally unsubscribed but off the orgList
- add skipStagingTruncate so background removal of a remote org cannot wipe
the home org's pending staged changes
- add recordUserDeleted (default true); background reconcile passes false
so an off-orglist removal does not populate the user-deleted suppression
list
- release add/delete + sync mutexes via an idempotent helper on every exit
path (incl. post-commit meta write and a throwing rollback) and open the
transaction inside the try to avoid leaking the locks
- log purged row counts and a per-cycle summary with a warn tripwire on
mass removals or failures
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -277,7 +277,7 @@ In the `CHIA_ROOT` directory (usually `~/.chia/mainnet` on Linux), CADT will add
277
277
***DATALAYER_FILE_SERVER_URL**: Publicly available URL and port where Chia Datalayer [files are served](#datalayer-http-file-serving), including schema (http:// or https://). If serving DataLayer files from S3, this would be the public URL of the S3 bucket. Port can be omitted if using standard ports for http or https requests.
278
278
***AUTO_SUBSCRIBE_FILESTORE**: Subscribing to the filestore for any organization is optional. To automatically subscribe and sync the filestore to every organization you subscribe to, set this to `true`.
279
279
***AUTO_MIRROR_EXTERNAL_STORES**: When set to true (the default), CADT will automatically create mirrors for each store you are subscribed to. Mirroring all subscriptions using the `DATALAYER_FILE_SERVER_URL` will make the entire CADT network more resilient and distributed. Note: `DATALAYER_FILE_SERVER_URL` must also be set to a valid URL or IP address for mirrors to be created. Both settings are required for external store mirroring to function.
280
-
***ONLY_CADT_SUBSCRIPTIONS**: When `true` (the default), CADT keeps DataLayer subscriptions aligned with the governance **orgList** in both directions. Organizations removed from the orgList are unsubscribed from DataLayer (`subscribed: false`); already-synced registry data on this node is **not** deleted. Organizations on the orgList that are not subscribed are subscribed (including orgs re-added after a prior removal, including orgs previously removed via the API delete flow). The home organization and governance body store are never auto-unsubscribed. Reconciliation runs only when a **non-empty** orgList is present locally (after a successful governance sync); an empty orgList is treated as “not ready” and does not trigger unsubscribes. Set to `false` to disable orglist-driven subscribe/unsubscribe reconciliation. While enabled, a manual unsubscribe of an org still listed on the orgList will be reverted on the next sync cycle.
280
+
* **ONLY_CADT_SUBSCRIPTIONS**: When `true` (the default), CADT keeps DataLayer subscriptions aligned with the governance **orgList** in both directions. Organizations removed from the orgList are unsubscribed from DataLayer **and completely removed from this node** — the organization record and **all** of its registry data (projects, units, and every related record it created) are deleted from the database. The deletion is unconditional: it does **not** check whether another organization references that data. Organizations on the orgList that are not subscribed are subscribed (including orgs re-added after a prior removal, including orgs previously removed via the API delete flow). The home organization and governance body store are never auto-removed. Reconciliation runs only when a **non-empty** orgList is present locally (after a successful governance sync); an empty orgList is treated as “not ready” and does not trigger removals. Set to `false` to disable orglist-driven subscribe/remove reconciliation. While enabled, a manual unsubscribe of an org still listed on the orgList will be reverted on the next sync cycle.
281
281
***LOG_LEVEL**: Controls verbosity of logging. Common settings are `info` and `debug`. Setting to `silly` will log all queries.
282
282
***TASKS**: Section for configuring sync intervals.
283
283
***GOVERNANCE_SYNC_TASK_INTERVAL**: Syncs picklist, orgList, and glossary from the governance node. Default 30 seconds.
0 commit comments