Question about member variable NodeTable::m_evictions

hellspawnhellspawn china beijingMember Posts: 7
in NodeTable.cpp i see:
 bool found = false;
       EvictionTimeout evictionEntry;
       DEV_GUARDED(x_evictions)
             for (auto it = m_evictions.begin(); it != m_evictions.end(); ++it)
             {
                   if (it->first.first == in.sourceid &&
                       it->first.second > std::chrono::steady_clock::now()
                       )
                       {
                            found = true;
                            evictionEntry = *it;
                            m_evictions.erase(it);
                            break;
                        }
              } 
I understand that the logic of this code segment is that when receive a Pong response message, scan the m_evictions list to see if you have received a Pong response message from the evicted node.
If exists, remove this node from the list of evicted nodes.
But,Why it should be satisfied: the time point of the evicted node is greater than the current time.
The evicted node eviction time point should always be in the past, should always be less than std: :chrono::steady_clock::now()
Sign In or Register to comment.