Please sign in to comment.
Fixed C++ exception pushing huge numbers of revs
Pusher::revHistoryString() would sometimes write every revision to the history, ignoring the maxRevTreeDepth limit. If there were thousands of revs in the history, this could overflow the BLIP message's properties and cause an exception on the receiving end. I fixed this. (Also moved the method to RevToSend, since it makes more sense there.) On the receiving side, I changed RevTree::insertHistory so it won't complain about truncated histories, as long as the truncated part is revs that would be pruned anyway. Unit tests added for both loopback and SG replications. Fixes CBL-106
- Loading branch information...
Showing with 147 additions and 41 deletions.
- +8 −3 C/tests/c4Test.cc
- +4 −1 C/tests/c4Test.hh
- +13 −5 LiteCore/Database/TreeDocument.cc
- +11 −2 LiteCore/RevTrees/RevTree.cc
- +3 −0 LiteCore/RevTrees/RevTree.hh
- +1 −28 Replicator/Pusher+DB.cc
- +0 −1 Replicator/Pusher.hh
- +62 −0 Replicator/ReplicatorTypes.cc
- +2 −0 Replicator/ReplicatorTypes.hh
- +1 −1 Replicator/tests/ReplicatorAPITest.hh
- +22 −0 Replicator/tests/ReplicatorLoopbackTest.cc
- +20 −0 Replicator/tests/ReplicatorSGTest.cc