apache/pulsar · warning · IllegalArgumentException

Update request ignored because it is out of date. Please try

Error message

Update request ignored because it is out of date. Please try again.

What it means

checkRequestOutDated compares an incoming update request's metadata version against the locally cached version. If the request version is not newer (isRequestOutdated), the manager throws IllegalArgumentException("Update request ignored because it is out of date. Please try again.") to reject stale writes to the function metadata topic.

Source

Thrown at pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionMetaDataManager.java:267

        if (needsScheduling) {
            this.schedulerManager.schedule();
        }
    }

    private void checkRequestOutDated(FunctionMetaData functionMetaData, boolean delete) {
        FunctionDetails details = functionMetaData.getFunctionDetails();
        if (isRequestOutdated(details.getTenant(), details.getNamespace(),
                details.getName(), functionMetaData.getVersion())) {
            log.debug().attr("tenant", details.getTenant())
                    .attr("namespace", details.getNamespace())
                    .attr("functionName", details.getName())
                    .attr("version", functionMetaData.getVersion())
                    .log("Ignoring outdated request version");
            if (delete) {
                throw new IllegalArgumentException(
                        "Delete request ignored because it is out of date. Please try again.");
            }
            throw new IllegalArgumentException("Update request ignored because it is out of date. Please try again.");
        }
    }

    /**
     * Acquires a exclusive producer.  This method cannot return null.  It can only return a valid exclusive producer
     * or throw NotLeaderAnymore exception.
     * @param isLeader if the worker is still the leader
     * @return A valid exclusive producer
     * @throws WorkerUtils.NotLeaderAnymore if the worker is no longer the leader.
     */
    public Producer<byte[]> acquireExclusiveWrite(Supplier<Boolean> isLeader) throws WorkerUtils.NotLeaderAnymore {
        // creates exclusive producer for metadata topic
        return WorkerUtils.createExclusiveProducerWithRetry(
                pulsarClient,
                workerConfig.getFunctionMetadataTopic(),
                workerConfig.getWorkerId() + "-leader",
                isLeader, 1000);
    }

View on GitHub (pinned to 820761864e)

Solutions

  1. Fetch the latest function metadata, apply your change on top of it (version + 1), and resubmit the update.
  2. Implement read-modify-write retry: on this error, GET current config, re-apply your modification, retry once or twice.
  3. Check whether another process/admin is concurrently updating the same function and coordinate.
  4. Don't cache FunctionMetaData across long intervals; always refresh immediately before update.

Example fix

// before
FunctionMetaData update = myOldSnapshot.toBuilder().setParallelism(4).build();
worker.updateFunction(update, null);
// after
FunctionMetaData latest = getFunction(tenant, namespace, functionName);
FunctionMetaData update = latest.toBuilder()
        .setVersion(latest.getVersion() + 1)
        .setParallelism(4).build();
worker.updateFunction(update, null);
Defensive patterns

Strategy: retry

Validate before calling

FunctionMetaData latest = admin.functions().getFunctionMetaData(tenant, ns, fn);
if (update.getVersion() <= latest.getVersion()) {
    // refresh version before submitting
    update = update.toBuilder().setVersion(latest.getVersion() + 1).build();
}

Try / catch

try {
    worker.updateFunction(update, uploadUrl);
} catch (IllegalArgumentException e) {
    if (e.getMessage().startsWith("Update request ignored")) {
        FunctionMetaData latest = refetch(tenant, ns, fn);
        update = update.toBuilder().setVersion(latest.getVersion() + 1).build();
        worker.updateFunction(update, uploadUrl);
    } else {
        throw e;
    }
}

Prevention

When it happens

Trigger: Calling updateFunctionOnLeader(..., delete=false) (via updateFunction / updateFunctionOnWorkerLeader) with a FunctionMetaData whose version <= the version currently cached on the leader worker — e.g. two clients updating the same function concurrently and the second one based its change on an older snapshot.

Common situations: Lost-update conflicts between multiple admins editing the same function; a client retrying after a partial failure with the original metadata object; a client whose read came from a non-leader worker that lagged behind.

Related errors


AI-assisted analysis of apache/pulsar@820761864e (2026-09-06). Data as JSON: /api/errors/f474700fa725eaf2. Report an issue: GitHub.