Project

General

Profile

Subtask #2744

Updated by Joao Eduardo Luis over 11 years ago

Create a new message type MMonSync, to dissociate it from the MMonProbe messages, and to allow us to use fields specific to the Synchronization process. 


 This new message shall have the following operation types: 
 <pre> 
  /** 
   

 * Start synchronization request 
   * (mon.X -> Leader) 
   */ 
   OP_START 		 = 1, 
   /** 
    * Reply to an OP_START 
    * (Leader -> mon.X) 
    */ 
   OP_START_REPLY 	 = 2, 
   /** 
    * Let 
 > the Leader know we are still synchronizing 
    * (mon.X -> Leader) 
    */ 
   OP_HEARTBEAT 	 = 3, 
   /** 
    * Reply sender (mon.X) wishes to a hearbeat 
    * (Leader -> mon.X) 
    */ 
   OP_HEARTBEAT_REPLY 	 = 4, 
   /** 
    * Let the Leader know we finished synchronizing 
    * (mon.X -> Leader) 
    */ 
   OP_FINISH 		 = 5, 
   /** 
    * Request a given monitor (mon.Y) to start synchronizing his store with us, hence 
    the receiver’s (mon.Y) store 
 * sending us chunks. 
    * (mon.X -> mon.Y) 
    */ 
   OP_START_CHUNKS 	 = 6, 
   /** 
    * Send OP_CHUNK 
 > the message contains a chunk of mon.Y’s store that is to a given monitor (mon.X) 
    be applied by mon.X 
 * (mon.Y -> mon.X) 
    */ 
   OP_CHUNK 		 = 7, 
   /** 
    * Acknowledge that we OP_CHUNK_ACK 
 > mon.X acks the last received chunk, allowing mon.Y to send the next chunk (if any), or to proceed to finishing the synchronization process if the ack refers to the last chunk sent 
    
 * (mon.X -> mon.Y) 
    */ 
   OP_CHUNK_REPLY 	 = 8, 
   /** 
    OP_TRIM_DISABLE 
 > request that the Leader stops trimming temporarily 
 * Reply OP_TRIM_ENABLE 
 > inform the Leader that it is now safe to an OP_FINISH 
    re-enable trimming 
 * (Leader -> mon.X) 
    */ 
   OP_FINISH_REPLY 	 = 9, 
   /** 
    * Let OP_TRIM_DISABLE_ACK 
 > Acknowledge to the receiver know requesting monitor that he should abort whatever he trimming is now disabled, and the Leader’s earliest version is packed in the middle 
    * of doing with the sender. 
    */ 
   OP_ABORT 		 = 10 
 </pre> 

 message 


 This message shall have the following flags: fields: 

 * uint32_t op 
 <pre> 
   /** 
    > The operation this message refers to 
 * Chunk is the last available 
    */ 
   const static uint8_t FLAG_LAST        = 0x01; 
   /** 
    * Let the other monitor it flags 
 > we should retry again its last operation. 
    */ 
   const static uint8_t FLAG_RETRY       = 0x02; 
   /** 
    * This message contains only need a crc 
    */ 
   const static uint8_t FLAG_CRC 	       = 0x04; 
   /** 
    ‘last_chunk’ flag, but we have 8 bits in case we need to extend it for some (now unforeseen) reason 
 * Do not reply bufferlist bl 
 > encoded transactions payload, to this message be applied to mon.X’s store 
 * version_t version 
 > earliest version on the sender, but Leader, and from which point will be safe to @p reply_to. 
    */ 
   const static uint8_t FLAG_REPLY_TO    = 0x08; 
 </pre> synchronize since no trimming operations will occur. 


 This message shall have the following fields: flags: 

 * FLAG_LAST (value: 0x01) 
 <pre> 
   uint32_t op; 
   uint8_t flags; 
   version_t version; 
   bufferlist chunk_bl; 
   pair<string,string> last_key; 
   __u32 crc; 
   entity_inst_t reply_to; > chunk is the last available; used on OP_CHUNK 
 </pre> * FLAG_RENEW (value: 0x02) 
 > Renew a trim operation; used both on OP_TRIM_DISABLE and OP_TRIM_DISABLE_ACK 
 * FLAG_DENIED (value: 0x04) 
 > The Operation / Request was denied: 
 >> OP_CHUNK -- A sync is already in progress 
 >> OP_TRIM_DISABLE -- If flag FLAG_RENEW is set, means there is no trim disable to renew.

Back