Rangsh commented on PR #12081:
URL: https://github.com/apache/seatunnel/pull/12081#issuecomment-7256829001

   Hi @SEZ9 — plain bullets only (no table). Product checklist: `7c9e0f192c`. 
`c0a6c38b1d` test-only. Fork Builds 45533084279 and 45302550317 = success. 
Daniel issue numbers ≠ your 1–8.
   
   **1. Bounded by design (caller-side)** — **Status: done on `7c9e0f192c`.** 
Where: `IMapFileStorage` — `operationDeadlineNanos()`, 
`queryExecuteStatusBeforeDeadline`, `batchQueryExecuteFailsStatus`; all waits 
use timed `get(remainingNanos, NANOSECONDS)` (and `get(0, NANOSECONDS)` only 
when the shared budget is exhausted).
   
   - **Your direct question:** untimed `RequestFuture#get()` is **not** 
unbounded. It calls `get(untimedGetTimeoutMillis, MILLISECONDS)` and wraps 
expiry in `ExecutionException` with `TimeoutException` cause (`RequestFuture`, 
head `c0a6c38b1d`).
   - **No production caller** uses no-arg `get()` on `RequestFuture` in 
`imap-storage-file`; only the timed overload paths above.
   - **Point 1 (`Error` / never dispatched):** **Yes** — caller waits stay 
bounded; on expiry we get `TimeoutException`, remove the cache entry in 
`finally`, return failure. The WAL worker does **not** catch `Error` on the 
write path.
   - **Point 3:** With point 1 **yes**, timed `get` → `TimeoutException` and 
capped no-arg `get` for `Future` API only is the **intended contract**.
   
   **2. Consumer survives failures (tested)** — **Status: done.** Where: 
`WALWorkHandler#executeResponse` (`try/catch (Exception)`). Tests: 
`WALWorkHandlerSurvivabilityTest`.
   
   - **Your direct question — which test:** `removedFutureShouldNotKillWorker` 
(missing `RequestFutureCache` entry after caller-side eviction) and 
`throwingDoneShouldNotKillWorker` (`done()` throws).
   - **After caller removed the request:** `executeResponse` **does not throw** 
when the entry is missing (WARN + return); the sole worker keeps processing. 
That is what `removedFutureShouldNotKillWorker` pins — not a wall-clock race IT.
   - **`done()` throwing** is a **separate** test 
(`throwingDoneShouldNotKillWorker`), not combined with removal in one method.
   
   **3. `RequestFuture.get()` semantics** — **Status: done (not the old 
behavior).** Where: `RequestFuture`; `RequestFutureTest`.
   
   - **Untimed `get()`:** **capped** (see item 1), not unbounded.
   - **Timed `get(long, TimeUnit)`:** throws **`TimeoutException`** on expiry; 
does **not** return `false`.
   
   **4. Writer after write failure / torn WAL** — **Status: fail-close by 
design.** Where: `WALWorkHandler` (`appendBlockedAfterWriteFailure`, APPEND in 
`walEvent`); `IMapFileStorage#isAppendPermanentlyBlocked()`; 
`WALWorkHandlerSurvivabilityTest`, `DefaultReaderTornMidFileRecordTest`, 
`DefaultReaderTornTrailingRecordTest`.
   
   - **Fail-close means:** we do **not** keep appending as if the WAL were 
healthy. Same writer handle may stay open, but further APPEND does **not** 
write more bytes; no in-process reopen/truncate; **restart** to recover.
   
   **5. Mockito / flush test** — **Status: done.** Where: root `pom.xml` 
(`mockito-junit-jupiter`, `mockito-inline`, test scope); 
`HdfsWriterFlushCallCountTest` (`imap-storage-file/.../wal/writer/`).
   
   - **`HdfsWriterFlushSyncPathTest` does not exist** on this branch. 
Flush/sync is covered by **`HdfsWriterFlushCallCountTest`**, not 
`WALWorkHandlerSurvivabilityTest`. `imap-storage-file/pom.xml` does not 
redeclare Mockito.
   
   **6. Batch `batchQueryExecuteFailsStatus`** — **Status: one shared deadline 
(not N × full timeout per entry).** Where: `IMapFileStorage` `storeAll` / 
`deleteAll` + `batchQueryExecuteFailsStatus`; test 
`IMapFileStorageBatchDeadlineTest`. Budget field `writDataTimeoutMilliseconds`; 
config key `writeDataTimeoutMilliseconds`.
   
   **7. Method-level Javadoc on timed `get`** — **Status: done.** Where: 
`RequestFuture#get(long, TimeUnit)` — `@throws TimeoutException`; timeout does 
not call `Future#cancel`; caller should treat expiry as failure for that key.
   
   **8. Timeout logging in `queryExecuteStatusBeforeDeadline` / batch path** — 
**Status: intentional policy (not ERROR stack per timeout).** Where: 
`IMapFileStorage` timeout branches.
   
   - On expected `TimeoutException`: **WARN** one-liner; **DEBUG** for stack. 
**Unexpected** wait failures remain **ERROR** with stack. Write failure 
semantics unchanged.
   
   If anything below is cut off on your side, tell me and I will repost **items 
5–8 only**.
   
   Ready for your synced-head pass on `7c9e0f192c`. Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to