if (!eb) {
eb = eb32_first(&st->table->updates);
if (!eb || (eb->key == st->last_pushed)) {
- st->table->commitupdate = st->last_pushed = st->table->localupdate;
+ st->last_pushed = st->table->localupdate;
return NULL;
}
}
* this means we are beyond localupdate.
*/
if ((eb->key - st->last_pushed) > (st->table->localupdate - st->last_pushed)) {
- st->table->commitupdate = st->last_pushed = st->table->localupdate;
+ st->last_pushed = st->table->localupdate;
return NULL;
}
st->last_pushed = updateid;
- if (peer_stksess_lookup == peer_teach_process_stksess_lookup) {
- uint commitid = _HA_ATOMIC_LOAD(&st->table->commitupdate);
-
- while ((int)(updateid - commitid) > 0) {
- if (_HA_ATOMIC_CAS(&st->table->commitupdate, &commitid, updateid))
- break;
- __ha_cpu_relax();
- }
- }
-
/* identifier may not needed in next update message */
new_pushed = 0;
/* Init cursors */
for (st = peer->tables; st ; st = st->next) {
- uint updateid, commitid;
-
st->last_get = st->last_acked = 0;
HA_RWLOCK_WRLOCK(STK_TABLE_UPDT_LOCK, &st->table->updt_lock);
/* if st->update appears to be in future it means
st->teaching_origin = st->last_pushed = st->update;
st->flags = 0;
- updateid = st->last_pushed;
- commitid = _HA_ATOMIC_LOAD(&st->table->commitupdate);
-
- while ((int)(updateid - commitid) > 0) {
- if (_HA_ATOMIC_CAS(&st->table->commitupdate, &commitid, updateid))
- break;
- __ha_cpu_relax();
- }
-
HA_RWLOCK_WRUNLOCK(STK_TABLE_UPDT_LOCK, &st->table->updt_lock);
}
st->flags, (unsigned long long)st->remote_data);
chunk_appendf(&trash, "\n last_acked=%u last_pushed=%u last_get=%u"
" teaching_origin=%u update=%u",
- st->last_acked, st->last_pushed, st->last_get,
- st->teaching_origin, st->update);
- chunk_appendf(&trash, "\n table:%p id=%s update=%u localupdate=%u"
- " commitupdate=%u refcnt=%u",
- t, t->id, t->update, t->localupdate, _HA_ATOMIC_LOAD(&t->commitupdate), t->refcnt);
+ st->last_acked, st->last_pushed, st->last_get, st->teaching_origin, st->update);
+ chunk_appendf(&trash, "\n table:%p id=%s update=%u localupdate=%u refcnt=%u",
+ t, t->id, t->update, t->localupdate, t->refcnt);
if (flags & PEERS_SHOW_F_DICT) {
chunk_appendf(&trash, "\n TX dictionary cache:");
count = 0;