SGC
May 20, 2020, 10:59am
72
deleting the database is recommend procedure in many cases… such as
Make sure that you used version of sqlite3 not older than v3.25.2.
If it’s, then your orders.db
is heavily corrupted. In such case we will recreate it.
Stop the storagenode
Remove the orders.db
Execute either with a local sqlite3 or with a docker:
sqlite3 orders.db
CREATE TABLE unsent_order (
satellite_id BLOB NOT NULL,
serial_number BLOB NOT NULL,
order_limit_serialized BLOB NOT NULL, -- serialized pb.OrderLimit
order_serialized BLOB NOT NULL, -- serialized pb.Order
order_limit_expiration TIMESTAMP NOT NULL, -- when is the deadline for sending it
uplink_cert_id INTEGER NOT NULL,
FOREIGN KEY(uplink_cert_id) REFERENCES certificate(cert_id)
);
CREATE TABLE order_archive_ (
satellite_id BLOB NOT NULL,
serial_number BLOB NOT NULL,
order_limit_serialized BLOB NOT NULL,
order_serialized BLOB NOT NULL,
uplink_cert_id INTEGER NOT NULL,
status INTEGER NOT NULL,
archived_at TIMESTAMP NOT NULL,
FOREIGN KEY(uplink_cert_id) REFERENCES certificate(cert_id)
);
CREATE UNIQUE INDEX idx_orders ON unsent_order(satellite_id, serial_number);
CREATE TABLE versions (version int, commited_at text);
CREATE INDEX idx_order_archived_at ON order_archive_(archived_at);
.exit
Try to start storagenode
Look into logs
so yes @BrightSilence is most certainly right that the database can be deleted if need be…
ofc one will need to recreate it afterwards and i’m pretty sure i’ve also seen little skunk recommend removal of the database in certain cases.