timmylicheng commented on a change in pull request #1191:
URL: https://github.com/apache/hadoop-ozone/pull/1191#discussion_r464418677
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineManagerV2Impl.java
##########
@@ -431,15 +464,21 @@ public void scrubPipeline(ReplicationType type,
ReplicationFactor factor)
* Schedules a fixed interval job to create pipelines.
*/
@Override
- public void startPipelineCreator() {
+ public void startPipelineCreator() throws NotLeaderException {
+ if (!scmhaManager.isLeader()) {
Review comment:
My thought:
1. Every SCM starts a pipeline creator thread. So I remove checkLeader in
startPipelineCreator
2. For triggerPipelineCreator, if we decide to let follower go thru safemode
once it steps up to be leader, we can have checkLeader there as well.
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineManagerV2Impl.java
##########
@@ -136,6 +139,9 @@ public static PipelineManagerV2Impl newPipelineManager(
@Override
public Pipeline createPipeline(ReplicationType type,
ReplicationFactor factor) throws IOException {
+ if (!scmhaManager.isLeader()) {
Review comment:
Updated.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]