Closed kasperisager closed 1 year ago
@kasperisager local-only, but other peers should be notified using a drop range message. then it can gossip later also if users want 👀
@mafintosh Is that as simple as:
this.replicator.onhave(start, end - start, true)
It is indeed!
@kasperisager and we'd wanna make sure this runs on the mutex also
@mafintosh I also need to make sure that this updates the contig pointer if necessary.
@kasperisager ya good catch on that
@mafintosh This is ready for another review.
@mafintosh Also, are there any observable behaviours during replication that I should test?
@kasperisager added a comment above, i think we can use the bitfield message in the oplog also to make this very safe (ie so it can be applied on restart, if fails half way through)
re replication. test the usual two peers and also a a->b->c scenario where b is the one that clears, so we know that the gossip works
@kasperisager good to go yea?
@mafintosh Should be, yes 👍
@mafintosh Is
core.clear()
only a local thing or should it notify peers as well?