Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
disable random lookup in Chord (tesh examples fail)
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Mon, 5 Aug 2013 15:45:45 +0000 (17:45 +0200)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Mon, 5 Aug 2013 15:45:45 +0000 (17:45 +0200)
examples/msg/chord/chord.c
examples/msg/chord/chord.tesh

index a433608..09c455f 100644 (file)
@@ -987,14 +987,19 @@ static void check_predecessor(node_t node)
  */
 static void random_lookup(node_t node)
 {
-  //int id = 1337; // TODO pick a pseudorandom id
-  if(node->stream == NULL)
+  
+  int id = 1337; 
+  find_successor(node, id);
+
+  /*** Random lookup disabled for tesh examples ***/
+  /*if(node->stream == NULL)
     node->stream = RngStream_CreateStream("");
   int random_index = RngStream_RandInt (node->stream, 0, nb_bits - 1);
   int random_id = node->fingers[random_index].id;
   XBT_DEBUG("Making a lookup request for id %d", random_id);
   int res = find_successor(node, random_id);
-  XBT_DEBUG("The successor of node %d is %d", random_id, res);
+  XBT_DEBUG("The successor of node %d is %d", random_id, res);*/
+
 }
 
 /**
index 16a5ac5..e2c44d9 100644 (file)
@@ -2973,5 +2973,4 @@ $ $SG_TEST_EXENV ${bindir:=.}/chord$EXEEXT ${srcdir:=.}/../../platforms/cluster.
 > [ 987.000000] (6:node@c-5.me)  2486268  | 10874876 
 > [ 987.000000] (6:node@c-5.me) Predecessor: 10004760
 > [1196.000000] (0:@) Messages created: 1827
-> [1196.000000] (0:@) Simulated time: 1196
-
+> [1196.000000] (0:@) Simulated time: 1196
\ No newline at end of file