Purge
The purge page is in the Tenant management › Purge menu.
“The deleted tenants, and what each service still holds of them: a tenant is purged when MyReg, the library and ALM all hold nothing.”
When a deleted tenant’s waiting period is over, subscription purges it and asks each service to erase its data (see The purge). This page is there to check that each service did, and to erase the data no purge reaches.
The top of the page picks the view: Deleted tenants or Orphan data.
Deleted tenants
This view lists the deleted tenants, the latest first. It only reads: it neither deletes nor restores anything.
At the top, tiles count the tenants shown, then those Purged, Data left, Incomplete and Not checked.
For each tenant, the table shows:
- Tenant: its name, the test tag for a test tenant, and its reference (the id the services know);
- Client;
- Deleted: how long ago (the exact date in a tooltip);
- Services: one tag per service, MyReg, Library and ALM, showing its last result, with the number of rows left if any;
- Status: the verdict (see Check a tenant);
- a magnifier, Check now.
The bar offers a search (“Name, tenant id or client”) and three scopes, each with its count: All, Test tenants, Client tenants. A test tenant is a tenant whose name contains playwright: the temporary tenants the automated tests create.
The header offers Refresh, which reads the list again, and Check the N shown, which checks every tenant shown, three at a time.
Check a tenant
Check now asks MyReg, the library and ALM how many rows and stored objects they still hold for that tenant. Each answer shows as soon as it arrives.
| Status | Meaning |
|---|---|
| Not checked | Nothing asked yet. |
| Checking… | At least one service has not answered yet. |
| Purged | All three services answer that nothing is left. |
| Data left | At least one service still holds something. |
| Incomplete | No service holds anything, but at least one could not answer. |
Once checked, the row’s arrow opens the Details per service: for each service, the time of the check and either “Nothing left.”, or the list of what is left, table by table (the store mention tells an object store from a table), the largest first, or the reason it could not answer:
- “This service cannot count a tenant’s data yet (no such endpoint).”
- “This service refused the request: platform administrators only.”
- “This service did not answer.”
A tenant showing Data left right after its deletion may simply be waiting for the service to handle the purge request. If the data stays, look at the service concerned: a service’s failed purge is retried, then set aside (see What each service purges).
Orphan data
“Data the services hold for a tenant id subscription does not know at all, whatever its status. No purge reaches it: subscription never deleted such a tenant.”
The view asks each service for the list of tenants it holds data for, and compares it with the tenants subscription knows, deleted ones included. An id only services know is an orphan.
At the top, the number of orphan tenant ids and the total: “N rows and stored objects in all”. Refresh reads everything again.
The table has one row per orphan id, the largest first: Tenant id (with “unknown to subscription”), one column per service with its rows (and its stored objects), a Total, and the Purge button. In a service’s column, a shield marks the id that service holds as its default tenant (“default tenant of this service: protected, never purged here”).
If a service could not give its list, a warning names it with the reason: “Some services could not list their tenants, the list may miss their orphans:” With no orphan: “No orphan data: every tenant id the services hold is known to subscription.”
Purge orphan data
This purge is final: “Every row and stored object below is deleted for good, in each service. There is no undo and no backup is taken.”
Purge opens the Purge orphan data dialog. It lists, per service, what will be deleted, and the services skipped because the id is their default tenant.
- Type the exact tenant id in Type the tenant id to confirm.
- Purge for good first asks subscription whether it knows this tenant now. If it does, nothing is sent: “subscription knows this tenant now: nothing was sent, nothing was deleted.”
- Otherwise each service holding something of that id purges it, one after the other. Its answer shows under its name:
| Answer | Meaning |
|---|---|
| “deleted: N rows, N stored objects” | Done. |
| “refused: subscription knows this tenant (409)” | The service checked with subscription, which knows this tenant. |
| “refused: this is the default tenant of the service (409)” | The service protects that id. |
| “refused: the service could not ask subscription (503)” | The service could not check; nothing is deleted. |
| “not available: no purge endpoint yet (404)” | That service cannot purge yet. |
| “refused: platform administrators only” | Authorisation refused. |
| “failed” | Any other error. |
Once each service has answered: “Each service answered. The list is read again on close.” Close reads the list again.
Default tenants of services
“A service running with subscription disabled keeps all its data under its default tenant, which subscription does not know. That service’s data of it is never purged from here; another service holding data of the same id may list it among the orphans.”
The Default tenants of services box, under the table, lists those ids: which service they are the default tenant of, and what each service holds of them. They are never purged in the service that names them so.
Who may do it
The page is reserved to platform administrators, like the whole console. Each service also checks, on its side, that the call comes from a platform administrator. See Rights.