apache/seatunnel · warning
requestId is not found in RequestFutureCache
Error message
requestId is {} not found in RequestFutureCache What it means
When an IMAP storage WAL event completes, executeResponse looks up the client's waiting future in the static RequestFutureCache by requestId. If the map has no entry (already completed, removed after timeout, or a response from a previous/cold-replayed WAL log), it logs this warning and drops the response instead of completing a future.
Solutions
- Verify client write timeouts are longer than WAL processing latency so futures are not removed before responses arrive
- Check for duplicate processing of WAL events (e.g., re-reading the same log segment after recovery)
- On recovery, tolerate this warning — it is expected for stale requestIds and no action is needed if it appears only during replay
- Inspect RequestFutureCache cleanup logic (remove-after-done) to rule out premature removal
Example fix
// before
RequestFutureCache.get(requestId).done(success);
// after
CompletableFuture<Boolean> future = RequestFutureCache.get(requestId);
if (future != null) {
future.done(success);
} else {
log.warn("requestId {} not found, possibly already timed out", requestId);
} Defensive patterns
Strategy: validation
Validate before calling
CompletableFuture<Boolean> f = RequestFutureCache.get(requestId);
if (f == null) { log.warn("stale requestId {}", requestId); return; } Type guard
if (RequestFutureCache.get(requestId) == null) return;
Prevention
- Keep client timeouts > WAL processing latency
- Idempotently guard cache lookups before calling done()
- Treat missing requestIds during WAL replay as normal
When it happens
Trigger: walEvent replays a WAL record whose requestId's future was already removed from RequestFutureCache (client timed out and removed it, or the node restarted and the cache is empty while old WAL entries are replayed).
Common situations: Client-side operation timeout removed the future before the WAL handler processed the write; replaying old WAL files on recovery whose requestIds are no longer registered; duplicate WAL entries processed twice.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- Consumer for queue already exists, skipping
- create new current writer failed, parent path is
- deserialize data error, class name is
- deserialize data error: data is s%, className is s%
- Error getting current Lsn/txId
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/39ebc5c2de4eda8a.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-engine/seatunnel-engine-storage/imap-storage-plugins/imap-storage-file/src/main/java/org/apache/seatunnel/engine/imap/storage/file/disruptor/WALWorkHandler.java:87
writer.write(iMapFileData);
} catch (IOException e) {
writeSuccess = false;
log.error("write orc file error, walEventBean is {} ", iMapFileData, e);
}
// return the result to the client
executeResponse(requestId, writeSuccess);
return;
}
if (type == WALEventType.CLOSED) {
// close writer and archive
writer.close();
}
}
private void executeResponse(long requestId, boolean success) {
if (null == RequestFutureCache.get(requestId)) {
log.warn("requestId is {} not found in RequestFutureCache", requestId);
return;
}
try {
RequestFutureCache.get(requestId).done(success);
} catch (RuntimeException e) {
log.error("response error, requestId is {} ", requestId, e);
}
}
}
View on GitHub (pinned to cf67b549a7)