lib/db: Don't whack blocks when putting truncated file (#6434)
As of the latest database checker we are again putting files without blocks. I'm not 100% convinced that's a great idea, but we also do it for ignored files apparently so it looks like we probably should support it. This adds an escape hatch that must be manually enabled...
This commit is contained in:
@@ -465,7 +465,7 @@ func (db *schemaUpdater) updateSchemato9(prev int) error {
|
||||
if fi.Blocks == nil {
|
||||
continue
|
||||
}
|
||||
if err := t.putFile(it.Key(), fi); err != nil {
|
||||
if err := t.putFile(it.Key(), fi, false); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := t.Checkpoint(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user