apache/druid · warning

Received creation event for existing entry

Error message

Received creation event for existing entry: %s

What it means

CachedMetadataCatalog.computeCreate() warns when a creation event arrives for a table entry already present in the cache. Instead of blindly overwriting, it delegates to computeUpdate() so the existing entry is updated in place. This indicates duplicate CREATE notifications or a cache that was not cleared between events.

Solutions

  1. Usually benign: the code safely falls back to computeUpdate(); verify table contents are correct after the event.
  2. If recurring, check the notifier/receiver for duplicate event delivery and ensure resync clears or reconciles entries.
  3. Force a resync() of the catalog cache to converge with authoritative metadata.
  4. Confirm the table was not dropped/recreated with the same name; if intentional, expect update semantics rather than a fresh entry.

Example fix

// before
// cache entry stale after table was recreated externally
// after
catalog.resync(); // reconcile cache; creation event for existing entry then handled as update
Defensive patterns

Strategy: validation

Validate before calling

if (catalogCache.getEntry(sqlName) != null) { treatAsUpdate(); } else { treatAsCreate(); }

Prevention

When it happens

Trigger: A TableMetadata create event (via update() or resync()) arrives for a table whose TableEntry already exists with a non-null table value; duplicated event delivery from the catalog broker; a table recreated externally with the same SQL name while the cache retains the old entry.

Common situations: Duplicate catalog notifications after broker reconnect; dropped/late messages replayed by the message bus; dropping and recreating a table with the same name; stale cache not invalidated before resync.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/a5092c0b411b2ba8. Report an issue: GitHub.

Appendix: source

Thrown at extensions-core/druid-catalog/src/main/java/org/apache/druid/catalog/sync/CachedMetadataCatalog.java:187

          );
          break;
        case PROPERTY_UPDATE:
          cache.compute(
              name,
              (k, v) -> computePropertiesUpdate(v, table)
          );
          break;
        default:
          // Don't know what to do
          return;
      }
      version = Math.max(version, table.updateTime());
    }

    private TableEntry computeCreate(TableEntry entry, TableMetadata update)
    {
      if (entry != null && entry.table != null) {
        LOG.warn("Received creation event for existing entry: %s", update.id().sqlName());
        return computeUpdate(entry, update);
      }
      return new TableEntry(update);
    }

    private TableEntry computeUpdate(TableEntry entry, TableMetadata update)
    {
      if (!checkExists(entry, update)) {
        return new TableEntry(update);
      }
      if (!checkVersion(entry, update)) {
        return entry;
      }
      return new TableEntry(update);
    }

    private boolean checkExists(TableEntry entry, TableMetadata update)
    {

View on GitHub (pinned to 9b90983fd2)