@@ -158,7 +158,8 @@ version_t NVMeofGwMon::get_trim_to() const
158158 * function called during new paxos epochs
159159 * function called to restore in pending map all data that is not serialized
160160 * to paxos peons. Othervise it would be overriden in "pending_map = map"
161- * currently "allow_failovers_ts" and "last_gw_down_ts" variables restored
161+ * currently "allow_failovers_ts", "last_gw_down_ts",
162+ * "last_gw_map_epoch_valid" variables are restored
162163 */
163164void NVMeofGwMon::restore_pending_map_info (NVMeofGwMap & tmp_map) {
164165 std::chrono::system_clock::time_point now = std::chrono::system_clock::now ();
@@ -175,6 +176,8 @@ void NVMeofGwMon::restore_pending_map_info(NVMeofGwMap & tmp_map) {
175176 }
176177 pending_map.created_gws [group_key][gw_id].last_gw_down_ts =
177178 gw_created_pair.second .last_gw_down_ts ;
179+ pending_map.created_gws [group_key][gw_id].last_gw_map_epoch_valid =
180+ gw_created_pair.second .last_gw_map_epoch_valid ;
178181 }
179182 }
180183}
@@ -804,12 +807,13 @@ bool NVMeofGwMon::prepare_beacon(MonOpRequestRef op)
804807 send_ack = true ;
805808 if (apply_ack_logic) {
806809 dout (20 ) << " ack sent: beacon index "
807- << pending_map.created_gws [group_key][gw_id].beacon_index
808- << " gw " << gw_id <<dendl;
810+ << pending_map.created_gws [group_key][gw_id].beacon_index
811+ << " gw " << gw_id << " epoch-filter " << epoch_filter_enabled
812+ << " propose " << propose << " gw-propose " << gw_propose << dendl;
809813 }
810814 }
811815 if (send_ack && ((!gw_propose && epoch_filter_enabled) ||
812- (propose && !epoch_filter_enabled) ||
816+ (! propose && !epoch_filter_enabled) ||
813817 (avail == gw_availability_t ::GW_CREATED)) ) {
814818 /* always send beacon ack to gw in Created state,
815819 * it should be temporary state
0 commit comments