WARN orders DB contains invalid marshalled orders

Recently I noticed an error in my docker log that says:
2020-01-04T19:24:58.897Z WARN orders DB contains invalid marshalled orders {“error”: “ordersdb error: database disk image is malformed”, “errorVerbose”: “ordersdb error: database disk image is malformed\n\tstorj.io/storj/storagenode/storagenodedb.(*ordersDB).ListUnsentBySatellite:169\n\tstorj.io/storj/storagenode/orders.(*Service).sendOrders:152\n\tstorj.io/storj/private/sync2.(*Cycle).Run:147\n\tstorj.io/storj/private/sync2.(*Cycle).Start.func1:68\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57”}

I now have some questions:

  1. What is the orders database used for?
  2. will my node function with a damaged or missing orders database?

I followed the instructions at How to fix a “database disk image is malformed” and it created a new orders.db but the strange thing is, my new orders.db is now 53MB and my “malformed” order.db which I still have a copy of is 78MB. So I’m thinking the new database is either more compact or a lot of data was dropped during the repair process, but I doubt my original orders.db contained 25MB of corrupted data so I’m thinking my new orders.db might be missing some data now.

Question #3. Should I go back to using my 78MB malformed orders.db database? or keep using my newly generated 53MB orders.db?

use the new repaired database, and also check your other databases, they also may have gotten corrupted. If any data was lost or not properly repaired, you would see that reflected in failed unrecoverable audits.

The size difference can easily be because sqlite3 databases don’t immediately remove deleted data. There is a vacuum command to get rid of the remaining junk data, but the process you used creates a new database and inserts back the data that should be there. The result is similar, the junk data will be gone. Nothing to worry about.