dragonknightk commented on PR #11182:
URL: https://github.com/apache/paimon/pull/11182#issuecomment-6913353248

   Thanks, confirmed: an interrupt while the caller is blocked in 
`SemaphoredDelegatingExecutor.execute` dispatched a delete without a permit.
   
   Fixed by giving abort its own permits: one per `file-operation.thread-num`, 
acquired with `acquireUninterruptibly` before each submission and released when 
the delete finishes. The interrupt is remembered and restored after all 
deletes. I took the first option you suggested, with permits owned by abort, 
because it keeps one task per file and reports failures in input order as 
before. `SemaphoredDelegatingExecutor` is unchanged.
   
   Added `testAbortKeepsDeleteBoundWhenInterruptedWhileSubmitting` with 
`file-operation.thread-num=1` and 4 real files: it holds the first delete, 
waits until the caller is blocked on a permit, interrupts it twice (waiting for 
it to block again after each), and checks that at most one delete is in flight, 
all files are deleted, and the interrupt flag is preserved. A no-interrupt run 
of the same test is the control. With the previous version it fails with 2 
concurrent deletes.
   
   (๑•̀ㅂ•́)و✧
   


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