How Filestore duplicate index chunk fix to another fullpath

Hi all, I have a question about the filestore: if two files have the same chunk, then there will only be an index block to A file in the filestore, After the A file is deleted and do GC, the index will still be there but it won’t update the index to the B file

Is there any workaround or am I wrong?

Your question is a little bit unclear, but I think this is what you’re asking:

If a block is shared by files A & B, the GC will not remove that block until both files A & B have been deleted.

Sorry, I didn’t make the problem clear.

While using FileStore, I encountered an issue: File A and File B have a completely identical block (for example, the first 256 KiB of both files are the same). However, in the implementation of FileStore, this block is only linked to either File A or File B. If this block is linked to File A, then after I delete File A and call a garbage collection (GC), the block still exists. However, the block remains linked to File A, and it does not automatically update to link to File B just because File A is deleted and File B still exists.

I hope I’ve made the point clear this time

We’re gonna need a lot more info, this isn’t how this works (or should work).

Please post a bug report at:

Include everything they ask for, and the detailed steps to reproduce what you are seeing.

You are not wrong and there is no workaround.

Code is here, fyi: boxo/filestore at main · ipfs/boxo · GitHub