p2panda / aquadoggo

Node for the p2panda network handling validation, storage, aggregation and replication
GNU Affero General Public License v3.0
69 stars 5 forks source link

Fix: include all logs from target schema id during replication #620

Closed sandreae closed 2 months ago

sandreae commented 2 months ago

During replication we take a TargetSet containing schema ids, first collect all documents which follow that schema, and then calculate the current height of logs associated with that document.

https://github.com/p2panda/aquadoggo/blob/4b11f2bdf28f7cde7326631e5951f2daa300f0ca/aquadoggo/src/replication/strategies/log_height.rs#L136-L144

We were missing some logs out because of differing expectations of how queries on our DocumentStore behaved. This PR introduces a dedicated query for the above task and includes all documents and logs known to the node locally in results.

closes: #619

📋 Checklist