balodesecurity opened a new pull request, #8321:
URL: https://github.com/apache/hadoop/pull/8321
## Summary
Fixes two related problems when a `QuotaExceededException` (e.g. disk-space
quota) is thrown during `DataStreamer.addBlock()`:
1. **Silent swallow / no WARN log** — the exception was caught and logged
only at `DEBUG` level, making quota failures invisible in production logs.
2. **Exception never reaches the client** — because the namenode returns no
datanode list when quota is exceeded, the output stream is never created and
`lastException` is never surfaced, leaving the client blocked indefinitely.
### Changes
**`DataStreamer.java`**
- Remove the `QuotaExceededException`-specific `DEBUG` branch; all
DataStreamer exceptions now emit a `WARN` log.
- After setting `lastException`, set `streamerClosed = true` and
`notifyAll()` on `dataQueue` for `QuotaExceededException` so the client thread
is unblocked immediately.
**`TestAbandonBlock.java`**
- Add `testQuotaExceptionPropagatedToClient`: sets a 1-byte space quota on a
directory, appends enough bytes to trigger a second `addBlock`, and asserts
that:
- `DSQuotaExceededException` is propagated to the caller.
- A `WARN`-level `"DataStreamer Exception"` log entry is emitted.
## Test plan
- [ ] `TestAbandonBlock#testQuotaExceptionPropagatedToClient` passes locally
✅
- [ ] Full module build passes (`mvn package ... -DskipTests`) ✅
--
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]