diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index 27a1099bd..04e2d2816 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -662,13 +662,6 @@ func syncthingMain(runtimeOptions RuntimeOptions) { } } - // Pack and optimize the database - if err := ldb.Compact(); err != nil { - // I don't think this is fatal, but who knows. If it is, we'll surely - // get an error when trying to write to the db later. - l.Infoln("Compacting database:", err) - } - m := model.NewModel(cfg, myID, myDeviceName(cfg), "syncthing", Version, ldb, protectedFiles) cfg.Subscribe(m) diff --git a/lib/db/leveldb_dbinstance.go b/lib/db/leveldb_dbinstance.go index 56aff7913..565cf9da6 100644 --- a/lib/db/leveldb_dbinstance.go +++ b/lib/db/leveldb_dbinstance.go @@ -91,10 +91,6 @@ func newDBInstance(db *leveldb.DB) *Instance { return i } -func (db *Instance) Compact() error { - return db.CompactRange(util.Range{}) -} - func (db *Instance) genericReplace(folder, device []byte, fs []protocol.FileInfo, localSize, globalSize *sizeTracker, deleteFn deletionHandler) int64 { sort.Sort(fileList(fs)) // sort list on name, same as in the database