apache/druid · warning
Shutting down Catalog sync with
Error message
Shutting down Catalog sync with %d unsent notifications
What it means
CacheNotifier.stop() logs a warning when the Catalog sync executor is shut down while its in-memory 'updates' queue still holds notifications that were never delivered. The queued table/property change notifications are discarded by shutdownNow(), so subscribers may miss updates. This is a lifecycle diagnostics warning, not an exception.
Solutions
- No action needed for the warning itself; it only indicates potentially lost notifications — dependent caches will resync on their next periodic resync().
- If frequent, increase the notification queue drain rate (check executor configuration) or reduce catalog update frequency.
- Ensure a clean shutdown path: call stop() only after consumers have caught up (graceful lifecycle ordering).
- Verify affected caches via resync after restart to repair any missed notifications.
Example fix
// before notifier.stop(); // warning: unsent notifications // after catalogReceiver.resync(); // after stop/restart, force full resync to recover dropped notifications
Defensive patterns
Strategy: fallback
Prevention
- Treat notifications as best-effort and always resync() after restart.
- Keep the updates queue drained; monitor its size in metrics.
- Shut down sync receivers before producers during lifecycle teardown.
When it happens
Trigger: Calling stop() (directly or via stopGracefully/Lifecycle.stop) while notification tasks are still pending in the updates queue; broker or coordinator shutdown while catalogs are being updated faster than notifications are drained.
Common situations: Druid process shutdown under heavy catalog churn; misconfigured short sync intervals combined with slow consumers; failing fast during startup teardown after a failed lifecycle init.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/fa7003cf64e44381.
Report an issue: GitHub.
Appendix: source
Thrown at extensions-core/druid-catalog/src/main/java/org/apache/druid/catalog/sync/CacheNotifier.java:118
@VisibleForTesting
public void stopGracefully()
{
try {
while (!updates.isEmpty()) {
Threads.sleepFor(100, TimeUnit.MILLISECONDS);
}
}
catch (InterruptedException e) {
// Ignore
}
stop();
}
public void stop()
{
if (!updates.isEmpty()) {
LOG.warn("Shutting down Catalog sync with %d unsent notifications", updates.size());
}
exec.shutdownNow();
LOG.info("Catalog sync stopped");
}
}
View on GitHub (pinned to 9b90983fd2)