Unable to delete expired piece info from DB

I started a node and in the logs I saw that message on startup: unable to delete expired piece info from DB.
So I stopped it and recreated databases and replaced the old piece_expiration.db with the freshly created one.
But something went wrong and node would not start with that database. The logs showed that it tried to alter the database (add trash column?) and failed.

So I am wondering why the fresh database would not work.

Perhaps it’s failed on the next database?
Could you post an error?

Weird…

I have just performed the same steps that I did yesterday.

unable to delete expired piece info from DB 
"error": "pieces error: database disk image is malformed", "errorVerbose": "pieces error: database disk image is malformed
INFO    db.migration.26 Add Trash column to pieceExpirationDB  {"Process": "storagenode"}

Replaced the database with the fresh one and this time no error… Node is starting up and running. :thinking:

I think this issue can be closed for now.

You need to check all databases, perhaps it complains on another one (I do not see a name in the error message).

There is no more complaint about other databases currently. So I think it is fine.