István Fajth created HDDS-15169:
-----------------------------------
Summary: Simplify and harden Ozone client write paths (DataStream,
Ratis, EC)
Key: HDDS-15169
URL: https://issues.apache.org/jira/browse/HDDS-15169
Project: Apache Ozone
Issue Type: Epic
Reporter: István Fajth
Assignee: István Fajth
The Ozone client write paths — DataStream, Ratis, and EC — share a
four-layer architecture:
KeyStream → EntryPool → EntryWrapper → BlockStream
The EntryWrapper layer (BlockOutputStreamEntry, ECBlockOutputStreamEntry,
BlockDataStreamOutputEntry) adds lazy initialization and type-unsafe
downcasting but provides little abstraction value. Nearly every
non-trivial method in these wrappers casts back to the concrete block
stream type. This indirection makes the code harder to follow and reason
about, and obscures the concurrency model at each layer boundary.
There are also several concurrency-related edge cases across the write
paths — exception handling gaps, unsynchronized check-then-act
sequences, and blocking calls without timeouts — that are difficult to
spot and test in the current structure.
Plan:
This JIRA tracks a phased approach to simplify the write paths and fix
the known edge cases:
DataStream path:
Add mock-based unit tests, fix the hsync exception handling,
simplify internal state management, fix commit-watcher races,
inline the StreamCommitWatcher, remove the entry wrapper, and
bound the close retry logic.
Test coverage for Ratis and EC:
Extend the mock-based unit test approach to the Ratis and EC paths,
providing fast deterministic coverage without MiniOzoneCluster.
Ratis and EC structural improvements:
Remove the entry wrapper classes from the Ratis and EC paths,
unify the entry pool classes behind a pluggable factory, and
add timeouts to the EC blocking calls.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]