swarm/storage: fix garbage collector index skew (#18080)
On file access LDBStore's tryAccessIdx() function created a faulty GC Index Data entry, because not indexing the ikey correctly. That caused the chunk addresses/hashes to start with '00' and the last two digits were dropped. => Incorrect chunk address. Besides the fix, the commit also contains a schema change which will run the CleanGCIndex() function to clean the GC index from erroneous entries. Note: CleanGCIndex() rebuilds the index from scratch which can take a really-really long time with a huge DB (possibly an hour).
Showing
- swarm/storage/ldbstore.go 84 additions, 38 deletionsswarm/storage/ldbstore.go
- swarm/storage/ldbstore_test.go 140 additions, 0 deletionsswarm/storage/ldbstore_test.go
- swarm/storage/localstore.go 32 additions, 15 deletionsswarm/storage/localstore.go
- swarm/storage/schema.go 12 additions, 1 deletionswarm/storage/schema.go
Loading
Please register or sign in to comment