I noticed strange behavior with the bloom filter file ON THE WINDOWS 10!
When a node receives a bloom filter, it saves it to disk in the /retain folder as a file with the name of the satellite (ukfu6bhbboxilvt7jrwlqk7y2tapb5d2r2tsmj2sjxvw5qaaaaaa-1714067999999645000).
Next, the work of collecting garbage begins.
A folder with the name of the current date appears in /trash and garbage collection begins there.
BUT!
If during garbage collection the node is restarted for some reason, the bloom filter file is deleted from the /retain folder and after the node is restarted, garbage is no longer collected.
The question arises - why save the bloom filter file to disk if after restarting the node it is deleted and the garbage collection process stops? That is, everything is exactly the same as it was without saving the bloom filter to disk.
Why, after restarting the node, the previously received bloom filter file no longer present and garbage collection does not continue?
But the same thing happened on version 101.
Everyone can check this for themselves.
Look at your bloom filter file in the /retain folder.
If there is a file there, then restart the node and you will see that it is immediately deleted.
I specifically tested this on 12 nodes. The behavior is the same everywhere - the bloom filter file is deleted when the node is restarted
I have these options configured:
storage2.piece-scan-on-startup: false
pieces.enable-lazy-filewalker: false
Could this be the reason?
Unfortunately, I don’t remember the nodes on which I tested this. Therefore, I can’t find information in the log now. I will definitely pay attention when working with the next bloom filter file
Shouldn’t be a problem. The first one is related the calculation of the used space.
The second one makes all the walkers running in the root process. (but actually I used the same settings, as I started storagenode with my IDE and debug it).
I am not sure about the node version of the other linked problem, but I will definitely keep my eyes on, and if there is more information, let me know… ready to debug further…
The situation repeated itself. Today I specifically checked for the presence of the bloom filter file. All nodes had a bloom filter file of 10 megabytes in size and were in the process of garbage collection. I specifically turned off all the nodes (46 nodes) correctly. After restarting the nodes, not a single node had a bloom filter file. The /ratain folder was empty!
The log file on all nodes has the same information:
INFO Got a signal from the OS: “terminated”
ERROR filewalker failed to reset progress in database {“error”: “gc_filewalker_progress_db: context canceled”, “errorVerbose”: “gc_filewalker_progress_db: context canceled\n\tstorj.io/storj/storagenode/storagenodedb.(*gcFilewalkerProgressDB).Reset:58 \n\tstorj.io/storj/storagenode/pieces.(*FileWalker).WalkSatellitePiecesToTrash.func1:171\n\tstorj.io/storj/storagenode/pieces.(*FileWalker).WalkSatellitePiecesToTrash:244\n\tstorj.io /storj/storagenode/pieces.(*Store).WalkSatellitePiecesToTrash:585\n\tstorj.io/storj/storagenode/retain.(*Service).retainPieces:369\n\tstorj.io/storj/storagenode/retain.( *Service).Run.func2:258\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:78”}
ERROR retain retain pieces failed {“cachePath”: “X:\!STORJ915\WORKDIR/retain”, “error”: “retain: filewalker: context canceled”, “errorVerbose”: “retain: filewalker: context canceled\n \tstorj.io/storj/storagenode/pieces.(*FileWalker).WalkSatellitePieces:74\n\tstorj.io/storj/storagenode/pieces.(*FileWalker).WalkSatellitePiecesToTrash:178\n\tstorj.io/storj/storagenode /pieces.(*Store).WalkSatellitePiecesToTrash:585\n\tstorj.io/storj/storagenode/retain.(*Service).retainPieces:369\n\tstorj.io/storj/storagenode/retain.(*Service). Run.func2:258\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:78”}
This is the normal restart way for windows nodes and should work flowlessly. I’ve done it many times when I had a win node. Even on Linux/Docker the restart command and shutdown -r works and dosen’t create problems to the node or db-es. I believe the normal restart takes into account that 5 min delay, and dosen’t kill the node instantly.
There is no Restart button on a case/MB. It’s the Reset button.
So, you did a restart from the Services applet, right?
And all bloom filters have been deleted from the drive?
Without a successful completion of a retain process in your logs?
Use common cmd commands: shutdown -s, shutdown -r. It’s normal reboot/shutdown way for windows nodes.
Yes.
In the same way, the bloom filter file is deleted if you restart the storagenode service (net stop storagenode/net start storagenode).
When the service are stops - the bloom filter file disappears/removed from the /retain folder
I think it’s not an expected behavior. The filter should be removed only on the successful finish of the retain process, not on restart. The whole point is to keep it during restarts, to continue the process from the stop point, not from the scratch.
Can you re-sent bloom filter (ukfu6bhbboxilvt7jrwlqk7y2tapb5d2r2tsmj2sjxvw5qaaaaaa) for my 23 oldest nodes? I don’t want to miss out on the opportunity to collect garbage with a 10 megabyte bloom filter. I can write node IDs
I believe they are sent weekly and they will be 10MB from now on. If you missed one, no problem. You will get the next one that can do the same job, aproximatively.
I believe I am seeing the same but I do not have logs as the nodes have been restarted.
But what I do see is that retain folder is empty and there seems to be an interruption in the garbage collection process as there is only one single folder in trash for the US-1 satellite.: /storage/trash/ukfu6bhbboxilvt7jrwlqk7y2tapb5d2r2tsmj2sjxvw5qaaaaaa/2024-05-03/aa
I cannot verify it but it looks strange I have more folders in the other satellite trash folders but also not many. It appears that the process of collecting garbage got interrupted and did not resume due to missing bloomfilter file on disk.
Maybe it would be an idea not to delete the bloomfilter file but to move it to trash instead?
Same satellite folder, different bloomfilter it seems. Both have only the aa folder in the trash. This does not look correct. The retain folder is empty.
Yes, you are thinking correctly. As soon as the bloom filter file disappears, the garbage collection process stops. And the folder “/storage/trash/ukfu6bhbboxilvt7jrwlqk7y2tapb5d2r2tsmj2sjxvw5qaaaaaa/DATE/…” stops filling.
This folder contains only what the garbage collector managed to collect. Then the process is interrupted.
I noticed that if this folder contains 1024 other 2-letters folders - then garbage collection for that satellite is complete. If not - the process is interrupted