Skip to content

Commit

Permalink
Bugfix: destoy delta encodedAdditions after its safe to do so
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunjeet committed Sep 9, 2023
1 parent 391578b commit 322c224
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public void applyDelta() {

from.encodedRemovals = null;
removalsReader.destroy();
additionsReader.destroy();
}

private void slowDelta() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public void applyDelta(HollowBlobInput in, HollowSchema schema, ArraySegmentRecy
nextData.applyDelta(oldData, deltaData);
shards[i].setCurrentData(nextData);
notifyListenerAboutDeltaChanges(deltaData.encodedRemovals, deltaData.encodedAdditions, i, shards.length);
deltaData.encodedAdditions.destroy();
oldData.destroy();
}
deltaData.destroy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public void applyDelta() {

from.encodedRemovals = null;
removalsReader.destroy();
additionsReader.destroy();
}

private void slowDelta() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public void applyDelta(HollowBlobInput in, HollowSchema schema, ArraySegmentRecy
nextData.applyDelta(oldData, deltaData);
shards[i].setCurrentData(nextData);
notifyListenerAboutDeltaChanges(deltaData.encodedRemovals, deltaData.encodedAdditions, i, shards.length);
deltaData.encodedAdditions.destroy();
oldData.destroy();
}
deltaData.destroy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ void applyDelta() {

from.encodedRemovals = null;
removalsReader.destroy();
additionsReader.destroy();
}

private boolean canDoFastDelta() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public void applyDelta(HollowBlobInput in, HollowSchema deltaSchema, ArraySegmen
nextData.applyDelta(oldData, deltaData);
shards[i].setCurrentData(nextData);
notifyListenerAboutDeltaChanges(deltaData.encodedRemovals, deltaData.encodedAdditions, i, shards.length);
deltaData.encodedAdditions.destroy();
oldData.destroy();
}
deltaData.destroy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public void applyDelta() {

from.encodedRemovals = null;
removalsReader.destroy();
additionsReader.destroy();

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public void applyDelta(HollowBlobInput in, HollowSchema schema, ArraySegmentRecy
nextData.applyDelta(oldData, deltaData);
shards[i].setCurrentData(nextData);
notifyListenerAboutDeltaChanges(deltaData.encodedRemovals, deltaData.encodedAdditions, i, shards.length);
deltaData.encodedAdditions.destroy();
oldData.destroy();
}
deltaData.destroy();
Expand Down

0 comments on commit 322c224

Please sign in to comment.