LiJie20190102 opened a new issue, #13903:
URL: https://github.com/apache/gravitino/issues/13903

   ### Describe the subtask
   
   ### Describe the subtask
   
   Implements the detection step of #13313: the server-side task that finds 
stale
   schema registrations of non-managed catalogs and reports them, removing 
nothing.
   It is the first of the five implementation subtasks approved with the design
   document (#13429, PR #13431); the removal policy and the REST surface land in
   later subtasks.
   
   Deliverables:
   
   - `StaleRegistrationReconciler`, following the `RelationalGarbageCollector`
     pattern: a single-thread daemon `ScheduledThreadPoolExecutor` with
     `start()`/`close()`, wired in `GravitinoEnv#initGravitinoServerComponents`
     and closed before the entity store shuts down.
   - Four `gravitino.reconcile.*` configuration keys: `enabled` (default 
`false`),
     `intervalSecs` (default `3600`), `catalogJitterSecs` (default `60`) and
     `policy` (default `report-only`).
   - A reconcile round over every metalake and every non-managed catalog, with a
     per-catalog random jitter and per-catalog error isolation: a failing 
catalog
     is logged and skipped and never aborts the round.
   - The three-condition stale judgment for schema registrations: the catalog 
does
     not manage storage for the schema scope; the explicit `schemaExists` probe
     reports the object absent; the probe did not fail for infrastructural
     reasons — a probe failure marks the catalog unreachable and skips it for 
the
     whole round. Absence is never inferred from a missing listing entry.
   - Outermost-stale selection for hierarchical namespaces, so a future 
cascading
     drop of a parent carries its descendants along.
   - An internal report model (`StaleCatalogReport`, `StaleSchemaEntry`) for the
     later REST subtask; every entry is reported with `removed == false`.
   - Unit tests for scheduling (no-op when disabled, jitter bounds), the three
     conditions, error isolation and outermost selection.
   
   Out of scope, in later subtasks of #13313: removal through the
   `SchemaDispatcher`, topic reconcile, REST endpoints, the reconciler system
   identity, and tables/views/filesets.
   
   Acceptance: with the defaults the feature is invisible; when enabled under
   `report-only`, a registration whose source object is gone is reported and
   nothing is deleted.
   
   ### Parent issue
   
   #13313


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to