Closed arorashu closed 4 years ago
So the IBLT implementation in our code use XOR based sums. I think XOR based sums would not work work multisets, i.e. here in IBLT, same key value pairs. This is also noted in the original IBLT paper in Section 3.
So, to support same keys (i.e. multisets), I am retooling IBLT implementation to work on sums. The main challenge currently is handling the overflows.
@arorashu What are the concrete overflow issues there, could you give an example? Note that they use XOR
more as an optimization for the case when there are no multiple copies of the same key-value pair. Their initial idea is to do residual arithmetic.
Also, look at IBLTSync.cpp:150
, the IBLT that we build there uses key = value = datum.to_ZZ()
. Thus, it can never happen that we insert different values for the same keys, it can only occur that we insert exactly the same key-value pair multiple times. That is, only "Extensions to Duplicates" (page 14 of the paper) applies in our case. The overflow that can get us into trouble is the word-value overflow on hashkeySum
. However, that would happen only when we have a large amount of key-value duplicates. For now, we should calculate the probability for that (seemingly unlikely event) to happen and live with it.
This was resolved in #66.
What?
Multiset reconciliation with IBLTSync may be buggy. Due to failing test:
IBLTSyncTest::IBLTSyncMultisetReconcileTest
in PR#61, I created a script to pin down a reproducible test case.The
TryMultisetIBLTSync.cpp
, in the spirit ofTryMe.cpp
asks the user to run client and server in different processes, run the sync, and reports stats.Initial data for
server
andclient
is loaded from files client0.txt and server0.txt.TryMultisetIBLTSync
runs bothIBLTSync
andCPISync
, The resultant client and server inIBLTSync
do not have the correct number of expected elements (as printed by the stats). At least the server should have expected elements. The resultant client and server inCPISync
are as expected (both have the same set after reconciliation).How to test?
sudo make install
./TryMultisetIBLTSync server
./TryMultisetIBLTSync client
Both the terminal instances will print stats for reconciliation.
My ouputs
Server
Client
P.S.:
IBLTSetOfSetsSync
with this dataset, but it usually failed withInvalid variable reference
, presumably because I was not setting parameters properly.syncTest
.