apache/pulsar · warning · IllegalArgumentException
Delete request ignored because it is out of date. Please try
Error message
Delete request ignored because it is out of date. Please try again.
What it means
checkRequestOutDated compares the incoming delete request's metadata version against the locally cached function metadata. If the request's version is older or equal to the current version (isRequestOutdated true), the delete is stale and the manager throws IllegalArgumentException("Delete request ignored because it is out of date. Please try again.") to force the client to re-read and resubmit.
Source
Thrown at pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionMetaDataManager.java:264
throw new IllegalStateException("Internal Error updating function at the leader", e);
}
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(),View on GitHub (pinned to 820761864e)
Solutions
- Re-read the current function metadata (GET function) and retry the delete with a version greater than the cached version.
- Treat this as a benign retry signal, not a hard failure — the function may already be deleted.
- Verify the delete actually succeeded before retrying to avoid pointless loops.
- Avoid long-lived stale FunctionMetaData objects; fetch fresh metadata immediately before each delete.
Example fix
// before
worker.deregisterFunction(tenant, namespace, functionName, staleMeta);
// after
FunctionMetaData current = getFunctionMetaData(tenant, namespace, functionName);
if (current != null) {
FunctionMetaData fresh = current.toBuilder().setVersion(current.getVersion() + 1).build();
worker.deregisterFunction(tenant, namespace, functionName, fresh);
} Defensive patterns
Strategy: retry
Validate before calling
FunctionMetaData current = admin.functions().getFunctionMetaData(tenant, ns, fn);
if (deleteMeta.getVersion() <= current.getVersion()) {
throw new IllegalArgumentException("Delete request is stale; refetch before deleting");
} Try / catch
try {
worker.deregisterFunction(tenant, ns, fn, meta);
} catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("Delete request ignored")) {
// function likely already deleted or version stale — refetch and retry once
} else {
throw e;
}
} Prevention
- Fetch fresh metadata immediately before every delete.
- Check whether the function still exists before retrying a delete.
- Avoid reusing cached FunctionMetaData objects across operations.
When it happens
Trigger: Calling updateFunctionOnLeader(..., delete=true) (via deregisterFunction) with a FunctionMetaData whose version does not advance beyond the version currently stored in the worker's functionMetaData cache — typically a replayed or delayed delete request.
Common situations: Client retried an old delete after a previous one already succeeded; admin client read metadata from a lagging worker/replica; two admins issued conflicting deletes and the loser's version is stale.
Related errors
- Update request ignored because it is out of date. Please try
- Version mismatch, actual=%s, expect=%s
- You must specify either a Fully Qualified Function Name (FQF
- You must specify a name for the function or a Fully Qualifie
- Cannot specify both jar and function-type
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/a6f7d3dbe73251c1.
Report an issue: GitHub.