HDDS-9279. Basic implementation of OM Follower read#9222
HDDS-9279. Basic implementation of OM Follower read#9222ivandika3 merged 15 commits intoapache:masterfrom
Conversation
szetszwo
left a comment
There was a problem hiding this comment.
@symious , Thanks for working on this!
A quick comment: For OM, any Ratis confs can be set by adding the ozone.om.ha prefix. In this case, the existing confs are
ozone.om.ha.raft.server.read.optionozone.om.ha.raft.server.read.leader.lease.enabled
So, the new confs are not needed.
@szetszwo Thank you for the review, configs removed. |
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OMConfigKeys.java
Outdated
Show resolved
Hide resolved
szetszwo
left a comment
There was a problem hiding this comment.
+1 the change looks good. It is very simple and elegant!
There was a problem hiding this comment.
Overall LGTM +1 since it is disabled by default so there should not be any regression. @symious Please help to address #9222 (comment) first.
Regarding my other comment #5288 (comment), we currently don't have clear root cause of the performance regression (e.g. whether it's inherent to the algorithm or implementation issues). I think we can merge this first and improve it from Ozone (e.g. client failover implementation) or Ratis (e.g. ReadIndex performance improvements) in follow up patches.
...op-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/OMFailoverProxyProviderBase.java
Show resolved
Hide resolved
|
@ivandika3 @szetszwo Thank you for the review and merge. |
| " DEFAULT - Directly query statemachine (non-linearizable). " + | ||
| " Only the leader can serve read requests. " + |
There was a problem hiding this comment.
| " DEFAULT - Directly query statemachine (non-linearizable). " + | |
| " Only the leader can serve read requests. " + | |
| " DEFAULT - Directly query statemachine. " + | |
| " Only the leader can serve read requests. " + |
IIUC, the current DEFAULT is still linearizable. To avoid confusion, let’s rename the modes to something more explicit—for example:
- leader-only
- follower-linearizable
- follower-stale-read (as introduced in HDDS-13954. Add localLease for followerRead #9320)
Then we can add our own parsing that maps these OM-level configs to the corresponding Ratis read options, instead of relying directly on RaftServerConfigKeys.Read.option(...).
There was a problem hiding this comment.
Currently this configuration is using directly from Ratis. If changed, OM Ratis Server won't start normally.
The thing is the localLease is not a 1:1 mapping, if locallease condition check doesn't fit, it will fallback to ReadIndex which is linearizable.
What changes were proposed in this pull request?
This is another implemetation of OM FollowerRead.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9279
How was this patch tested?
Test with new Freon class: FollowerReader.