Error during preflight check for storagenode databases после некорректного рестарта

После не очень корректного перезапуска компьютера при старте выдает ошибку

2020-03-13T13:33:26.916+0300 DEBUG Unrecoverable error {“error”: “Error during preflight check for storagenode databases: storage node preflight database error: reputation: expected schema does not match actual: &dbschema.Schema{\n \tTables: *dbschema.Table{\n \t\t&{Name: "reputation", Columns: *dbschema.Column{&{Name: "audit_reputation_alpha", Type: "REAL"}, &{Name: "audit_reputation_beta", Type: "REAL"}, &{Name: "audit_reputation_score", Type: "REAL"}, &{Name: "audit_success_count", Type: "INTEGER"}, &{Name: "audit_total_count", Type: "INTEGER"}, &{Name: "disqualified", Type: "TIMESTAMP", IsNullable: true}, &{Name: "satellite_id", Type: "BLOB"}, &{Name: "updated_at", Type: "TIMESTAMP"}, &{Name: "uptime_reputation_alpha", Type: "REAL"}, &{Name: "uptime_reputation_beta", Type: "REAL"}, &{Name: "uptime_reputation_score", Type: "REAL"}, &{Name: "uptime_success_count", Type: "INTEGER"}, &{Name: "uptime_total_count", Type: "INTEGER"}}, PrimaryKey: string{"satellite_id"}},\n+ \t\t&{\n+ \t\t\tName: "test_table",\n+ \t\t\tColumns: *dbschema.Column{\n+ \t\t\t\t&{Name: "id", Type: "int"},\n+ \t\t\t\t&{Name: "name", Type: "varchar(30)", IsNullable: true},\n+ \t\t\t},\n+ \t\t\tPrimaryKey: string{"id"},\n+ \t\t},\n \t},\n \tIndexes: nil,\n }\n\n\tstorj.io/storj/storagenode/storagenodedb.(*DB).Preflight:301\n\tmain.cmdRun:198\n\tstorj.io/storj/pkg/process.cleanup.func1.2:312\n\tstorj.io/storj/pkg/process.cleanup.func1:330\n\tgithub.com/spf13/cobra.(*Command).execute:826\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:914\n\tgithub.com/spf13/cobra.(*Command).Execute:864\n\tstorj.io/storj/pkg/process.ExecWithCustomConfig:84\n\tstorj.io/storj/pkg/process.Exec:61\n\tmain.(*service).Execute.func1:66\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57”, “errorVerbose”: “Error during preflight check for storagenode databases: storage node preflight database error: reputation: expected schema does not match actual: &dbschema.Schema{\n \tTables: *dbschema.Table{\n \t\t&{Name: "reputation", Columns: *dbschema.Column{&{Name: "audit_reputation_alpha", Type: "REAL"}, &{Name: "audit_reputation_beta", Type: "REAL"}, &{Name: "audit_reputation_score", Type: "REAL"}, &{Name: "audit_success_count", Type: "INTEGER"}, &{Name: "audit_total_count", Type: "INTEGER"}, &{Name: "disqualified", Type: "TIMESTAMP", IsNullable: true}, &{Name: "satellite_id", Type: "BLOB"}, &{Name: "updated_at", Type: "TIMESTAMP"}, &{Name: "uptime_reputation_alpha", Type: "REAL"}, &{Name: "uptime_reputation_beta", Type: "REAL"}, &{Name: "uptime_reputation_score", Type: "REAL"}, &{Name: "uptime_success_count", Type: "INTEGER"}, &{Name: "uptime_total_count", Type: "INTEGER"}}, PrimaryKey: string{"satellite_id"}},\n+ \t\t&{\n+ \t\t\tName: "test_table",\n+ \t\t\tColumns: *dbschema.Column{\n+ \t\t\t\t&{Name: "id", Type: "int"},\n+ \t\t\t\t&{Name: "name", Type: "varchar(30)", IsNullable: true},\n+ \t\t\t},\n+ \t\t\tPrimaryKey: string{"id"},\n+ \t\t},\n \t},\n \tIndexes: nil,\n }\n\n\tstorj.io/storj/storagenode/storagenodedb.(*DB).Preflight:301\n\tmain.cmdRun:198\n\tstorj.io/storj/pkg/process.cleanup.func1.2:312\n\tstorj.io/storj/pkg/process.cleanup.func1:330\n\tgithub.com/spf13/cobra.(*Command).execute:826\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:914\n\tgithub.com/spf13/cobra.(*Command).Execute:864\n\tstorj.io/storj/pkg/process.ExecWithCustomConfig:84\n\tstorj.io/storj/pkg/process.Exec:61\n\tmain.(*service).Execute.func1:66\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57\n\tmain.cmdRun:200\n\tstorj.io/storj/pkg/process.cleanup.func1.2:312\n\tstorj.io/storj/pkg/process.cleanup.func1:330\n\tgithub.com/spf13/cobra.(*Command).execute:826\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:914\n\tgithub.com/spf13/cobra.(*Command).Execute:864\n\tstorj.io/storj/pkg/process.ExecWithCustomConfig:84\n\tstorj.io/storj/pkg/process.Exec:61\n\tmain.(*service).Execute.func1:66\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57”}

нода на Windows GUI

 .\sqlite3.exe reputation.db "PRAGMA integrity_check;"

выдает “ok”. остальные файлы также “ok”.

почитал лог, дошло.

./sqlite3 .\reputation.db
sqlite> drop table test_table;
sqlite> .exit

заработало.

1 Like