Fixing a bug
authorHarshitha <gplkrsh2@illinois.edu>
Sun, 6 May 2012 05:04:58 +0000 (00:04 -0500)
committerHarshitha <gplkrsh2@illinois.edu>
Sun, 6 May 2012 05:04:58 +0000 (00:04 -0500)
src/ck-ldb/LBDatabase.C

index 5df8179b227f05cb8ca53f4f3b80f03d38bf2990..bfe985f4373ced165645181f90badf050daf44ed 100644 (file)
@@ -1043,11 +1043,14 @@ int LBDatabase::getPredictedLBPeriod(bool& is_tentative) {
   // If tentative and final_lb_period are the same, then the decision has been
   // made but if not, they are in the middle of consensus, hence return the
   // lease of the two
-  if (adaptive_struct.tentative_period < adaptive_struct.final_lb_period) {
+  if (adaptive_struct.tentative_period != adaptive_struct.final_lb_period) {
     is_tentative = true;
+  } else {
+    is_tentative = false;
+  }
+  if (adaptive_struct.tentative_period < adaptive_struct.final_lb_period) {
     return adaptive_struct.tentative_period;
    } else {
-     is_tentative = false;
      return adaptive_struct.final_lb_period;
    }
 }