Details
Description
When user calls Admin.enableCatalogJanitor(false) to disable the catalog janitor, it expects that the janitor would stop working once the API returns. It is not true, the janitor could have an active scan going on and clean up unused region. The 'false' state would be enforced during the next background runs.
To avoid confusing, if 'CatalogJanitor.enabled' is true and we want to set to false in CatalogJanitor#setEnabled, the function should wait for the on-going active scan to complete.