main - bugfix

- Nodes not being removed when deleted because when node gossips again
  it is readded.
- Keep track of highest vector clock we have removed and used this as a
  mark for determining if something is stale.
This commit is contained in:
Tim Beatham
2023-12-11 11:09:02 +00:00
parent 3222d7e388
commit 13bea10638
3 changed files with 20 additions and 6 deletions

View File

@@ -94,9 +94,9 @@ func present(syncer *TwoPhaseSyncer) ([]byte, bool) {
if err != nil {
logging.Log.WriteErrorf(err.Error())
}
}
difference := syncer.mapState.Difference(&mapState)
difference := syncer.mapState.Difference(syncer.manager.store.Clock.GetStaleCount(), &mapState)
syncer.manager.store.Clock.Merge(mapState.Vectors)
var sendBuffer bytes.Buffer