Review Board 1.7.22


Patch for KAFKA-1069

Review Request #14534 - Created Oct. 8, 2013 and updated

Jun Rao
KAFKA-1069
Reviewers
kafka
kafka
kafka-1069

 

Diff revision 1 (Latest)

  1. core/src/main/scala/kafka/cluster/Partition.scala: Loading...
core/src/main/scala/kafka/cluster/Partition.scala
Revision a9bb3c8c450f99d8e110ae6709c5fe1fe09a8f77 New Change
[20] 66 lines
[+20]
67
    }
67
    }
68
  )
68
  )
69

    
   
69

   
70
  def isUnderReplicated(): Boolean = {
70
  def isUnderReplicated(): Boolean = {
71
    leaderIsrUpdateLock synchronized {
71
    leaderIsrUpdateLock synchronized {

    
   
72
      leaderReplicaIfLocal() match {

    
   
73
        case Some(_) =>
72
      inSyncReplicas.size < replicationFactor
74
          inSyncReplicas.size < replicationFactor

    
   
75
        case None =>

    
   
76
          false

    
   
77
      }
73
    }
78
    }
74
  }
79
  }
75

    
   
80

   
76
  def getOrCreateReplica(replicaId: Int = localBrokerId): Replica = {
81
  def getOrCreateReplica(replicaId: Int = localBrokerId): Replica = {
77
    val replicaOpt = getReplica(replicaId)
82
    val replicaOpt = getReplica(replicaId)
[+20] [20] 314 lines
  1. core/src/main/scala/kafka/cluster/Partition.scala: Loading...