[Spread-cvs] cvs commit: spread/daemon groups.c
spread-users@lists.spread.org
spread-users@lists.spread.org
Tue, 17 Sep 2002 20:05:38 -0400
jonathan 02/09/18 00:05:38
Modified: daemon groups.c
Log:
A slight optimization, the groups messages only need to be sent with AGREED
semantics not SAFE. Thanks to Yair and Ryan Caudy.
Revision Changes Path
1.8 +8 -8 spread/daemon/groups.c
Index: groups.c
===================================================================
RCS file: /storage/cvsroot/spread/daemon/groups.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- groups.c 29 Aug 2002 15:43:01 -0000 1.7
+++ groups.c 18 Sep 2002 00:05:37 -0000 1.8
@@ -116,7 +116,7 @@
static int G_smallest_group_indices( Skiplist *work, struct worklist *indices[] );
static void G_compute_and_notify(void);
static void G_print(void);
-static void G_empty_groups_bufs(void);
+static void G_empty_groups_bufs(void);
static Skiplist GroupsList;
@@ -427,7 +427,7 @@
/* build and send Groups message */
/* Nowadays, we can send multiple groups messages. No group has
* data in more than one. As an optimization, only the last message is
- * SAFE, and all previous ones are RELIABLE. G_handle_groups uses this
+ * AGREED, and all previous ones are RELIABLE. G_handle_groups uses this
* knowledge when parsing Groups messages. */
passed_iter = NULL;
do {
@@ -441,7 +441,7 @@
if( passed_iter )
head_ptr->type |= RELIABLE_MESS;
else
- head_ptr->type |= SAFE_MESS;
+ head_ptr->type |= AGREED_MESS;
Message_Buffer_to_Message_Fragments( msg, grps_buf_link->buf, grps_buf_link->bytes );
down_ptr = Prot_Create_Down_Link(msg, Message_get_packet_type(head_ptr->type), 0, 0);
@@ -451,7 +451,7 @@
Prot_new_message( down_ptr, Groups_control_down_queue );
Message_Dec_Refcount(msg);
Alarm( GROUPS, "G_handle_reg_memb: (%8s) GROUPS message sent in GTRANS with %d bytes\n",
- (passed_iter) ? "RELIABLE" : "SAFE", grps_buf_link->bytes );
+ (passed_iter) ? "RELIABLE" : "AGREED", grps_buf_link->bytes );
} while( passed_iter != NULL );
Gstate = GGATHER;
@@ -499,7 +499,7 @@
if( grps_buf_link->next )
head_ptr->type |= RELIABLE_MESS;
else
- head_ptr->type |= SAFE_MESS;
+ head_ptr->type |= AGREED_MESS;
Message_Buffer_to_Message_Fragments( msg, grps_buf_link->buf, grps_buf_link->bytes );
down_ptr = Prot_Create_Down_Link(msg, Message_get_packet_type(head_ptr->type), 0, 0);
@@ -509,7 +509,7 @@
Prot_new_message( down_ptr, Groups_control_down_queue );
Message_Dec_Refcount(msg);
Alarm( GROUPS, "G_handle_reg_memb: (%8s) GROUPS message sent in GGT with %d bytes\n",
- (grps_buf_link->next) ? "RELIABLE" : "SAFE", grps_buf_link->bytes );
+ (grps_buf_link->next) ? "RELIABLE" : "AGREED", grps_buf_link->bytes );
}
Gstate = GGATHER;
@@ -1402,8 +1402,8 @@
mess_link->next = Gathered.next;
Gathered.next = mess_link;
Num_mess_gathered++;
- /* The last Groups message a daemon sends is SAFE. */
- if( Is_safe_mess( head_ptr->type ) ) Num_daemons_gathered++;
+ /* The last Groups message a daemon sends is AGREED. */
+ if( Is_agreed_mess( head_ptr->type ) ) Num_daemons_gathered++;
Alarm( GROUPS, "G_handle_groups: GROUPS message received from %s - msgs %d, daemons %d\n",
head_ptr->private_group_name, Num_mess_gathered, Num_daemons_gathered );
if( Num_daemons_gathered != Conf_num_procs( &Reg_memb ) )