Swarm: Censorship resistant storage and communication infrastructure for a truly sovereign digital society
GNU Lesser General Public License v3.0
489
stars
110
forks
source link
storage/localstore: Local Pinning fix for pinned chunks #2200
Closed
santicomp2014 closed 4 years ago
This PR closes issue #2195, to summarize GC was removing pinned chunks when it was not supposed to.
This is related to PR #2190 which was the incorrect fix for this bug, thanks to @jmozah for providing the correct fix for this situation.
The solution is to check if the chunk is in the pinIndex before inserting it into gcIndex, this avoids the GC removing the chunk in the first place.
Replaced in these files
mode_set.go
mode_get.go
mode_put.go
Also, the test
TestDBDebugIndexes
was corrected due to the pinned chunks now being avoided correctly.Test criteria were:
--pin
The bug is also in Bee and it is fixed in a similar fashion