hevinhsu commented on PR #9294:
URL: https://github.com/apache/ozone/pull/9294#issuecomment-3615994571

   Hi @ivandika3,
   
   I tried a new implementation that introduces a runnable `preCommit` 
interface to perform validation before `commitKey`.  
   This approach avoids adding S3-specific logic into `client.io`, so the 
validation can be set from `ObjectEndpoint` via `setPreCommit`.
   
   However, the current implementation feels suboptimal. To avoid changing 
existing method signatures, I throw `IllegalArgumentException` when validation 
fails, and then transform that exception into an `O3SException` in 
`ObjectEndpoint` if the error message matches.
   
   I have a couple of questions:
   
   * Is this design acceptable (i.e., introducing `preCommit` in 
`KeyOutputStream` and exposing it via a setter)?
   * Converting `IllegalArgumentException` into `O3SException` feels like an 
awkward way to handle the error — is there a better approach you’d recommend?
   
   PTAL when you have time, 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to