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

   @SEZ9 Thanks for the checklist — point-by-point against synced head 
`a370bdf6b3` (Nov 21 Daniel follow-ups on `412ee1c763`, plus `d0345c8824` 
interrupt-test fix and `a370bdf6b3` Windows `@EnabledOnOs` for the Hadoop ring 
saturation IT).
   
   ## Points from my earlier summary (confirmations)
   
   **1. Batch deadline (`IMapFileStorageBatchDeadlineTest`)**
   - **Test shape:** Public `storeAll` / `deleteAll` only (no reflection on 
`batchQueryExecuteFailsStatus`).
   - **Production behavior:** One `operationDeadlineNanos()` per batch; 
`batchQueryExecuteFailsStatus` calls timed `RequestFuture.get(remainingNanos, 
…)` where `remainingNanos = max(0, deadlineNanos − nanoTimeSource)`. That is a 
**shared** budget across admission + batch wait—not *N × 
writDataTimeoutMilliseconds* when the WAL worker never completes.
   - **Stuck-worker upper bound in the test:** Mock WAL admits but never 
completes; `TIMEOUT_MS = 50`, `PENDING_KEYS = 5`. Assertions: every key lands 
in the failure set, wall time **< 50 × 5 ms** and **≥ ~50 ms**, so five full 
per-entry waits would fail the test.
   
   **2. Stalled consumer / caller wait**
   - **Ring admission:** `IMapFileStorage.admit()` uses bounded 
`WALDisruptor.tryPublish(…, waitNanos)`; rejected admission removes the pending 
future from `RequestFutureCache` (see `WALDisruptorBoundedAdmissionTest` + 
`IMapFileStorageRingAdmissionTest`).
   - **Untimed `RequestFuture.get()`:** Not unbounded on head. It caps via 
`get(untimedGetTimeoutMillis, MILLISECONDS)` (same default as storage write 
timeout) and surfaces timeout as `ExecutionException` with `TimeoutException` 
cause (`RequestFuture` + `RequestFutureTest`).
   - **Production `IMapFileStorage`:** Uses **only** timed `get(remainingNanos, 
NANOSECONDS)` / `get(0, NANOSECONDS)` in `queryExecuteStatusBeforeDeadline` and 
`batchQueryExecuteFailsStatus`—no production path calls the no-arg `get()`.
   
   **3. Flush tests / Mockito**
   - `HdfsWriterFlushSyncPathTest` is not on this branch. Coverage is 
`HdfsWriterFlushCallCountTest` (one `hsync`/`hflush` branch per Mockito-backed 
case) plus `flushShouldExposeRecordsOnLocalFileSystem` (local FS write → flush 
→ `WALReader` read-back); `HdfsWriterDurableFlushTest` still covers mid-stream 
visibility.
   - `imap-storage-file/pom.xml` does not declare Mockito explicitly; tests use 
the **reactor root** test dependencies (`mockito-junit-jupiter` / 
`mockito-inline` in the parent POM). CI and local `mvn test` resolve Mockito 
without a module-specific `pom.xml` change.
   
   ## Points not in my earlier summary
   
   **4. Worker survival (`WALWorkHandler`)** — **Fixed on head.** APPEND 
catches broad `Exception`; `executeResponse()` is wrapped so a failed `done()` 
or missing cache entry cannot kill the sole Disruptor consumer. Covered by 
`WALWorkHandlerSurvivabilityTest` (including flush/hsync throw → sticky 
fail-close, next APPEND handled).
   
   **5. Writer reuse after write failure** — **Fixed on head.** Sticky 
`appendBlockedAfterWriteFailure`; further APPEND does not append on a possibly 
torn stream (no blind `fs.create` on `wal.txt`). Covered by survivability 
tests, torn-frame reader tests, and FileMapStore fail-close paths.
   
   **6. `RequestFuture.get()` compatibility** — **Addressed.** Timed `get` 
throws `TimeoutException` on expiry (per `Future`). Untimed `get` is capped, 
not unbounded (see #2). Production wait paths in `IMapFileStorage` use the 
timed overload only.
   
   **7. Method-level Javadoc** — **On head:** `RequestFuture#get(long, 
TimeUnit)` documents timeout behavior, `TimeoutException`, and that timeout 
does not cancel the in-flight append; class-level doc covers the required 
no-arg `Future#get()` overload.
   
   **8. Log noise on timeout** — **Addressed.** 
`queryExecuteStatusBeforeDeadline` / `batchQueryExecuteFailsStatus`: **WARN** 
for the one-line timeout summary; full `TimeoutException` stack at **DEBUG** 
only (batch comment: avoid ERROR per key). Non-timeout failures remain ERROR.
   
   ## Local test results (commands from my earlier note)
   
   Environment: macOS, HEAD `a370bdf6b3`.
   
       ./mvnw spotless:apply -pl :imap-storage-file,:seatunnel-engine-server
   
   **imap-storage-file**
       ./mvnw -pl :imap-storage-file test 
-Dtest=WALDisruptorBoundedAdmissionTest,IMapFileStorageBatchDeadlineTest,IMapFileStorageRingAdmissionTest,HdfsWriterFlushCallCountTest,WALWorkHandlerSurvivabilityTest,RequestFutureTest
   
       Tests run: 22, Failures: 0, Errors: 0, Skipped: 0 — BUILD SUCCESS
       (BoundedAdmission 4, BatchDeadline 2, RingAdmission 3, FlushCallCount 4, 
Survivability 4, RequestFuture 5)
   
   **seatunnel-engine-server**
       ./mvnw -pl :seatunnel-engine-server test 
-Dtest=CheckpointPayloadMonitorFaultToleranceTest
   
       Tests run: 1, Failures: 0, Errors: 0 — BUILD SUCCESS
   
   Fork Build was re-triggered on `a370bdf6b3` after fixing Ubuntu interrupt 
assertion and skipping the Hadoop local-FS ring saturation IT on Windows CI 
(`HADOOP_HOME`).
   
   Happy to clarify anything still open after your synced-head pass. Thanks 
again.


-- 
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