Skip to main content

KernelDB.doctor()

Report the health of the database, with no metakernel argument (#46).

Usage

Source

KernelDB.doctor()

The CLI’s doctor prints the result and exits 1 only when poisoned is not empty. That is the one state that is corruption, since every update re-downloads those kernels. A scan_directory of the directory holding a conflicting path keeps the row that matches the file on disk and supersedes the others. register_file supersedes every stale row at the path, not only one.

Returns

dict

With the keys:

  • n_kernels, n_locations and n_metakernels: the row counts;
  • poisoned: the poisoned_superseded() rows;
  • missing_locations: location paths whose file is gone, which clean removes;
  • conflicting_locations: paths with more than one locations row, that is, one file registered under more than one hash (#48);
  • missing_metakernels: registry filenames whose file is gone, which rm removes.