mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
repack the ldb after re-indexing
re-indexing in ldb is triggered on any modification to the @ATTRIBUTES or @INDEXLIST records. This happens to produce a worst-case fragmentation of the database, as all @INDEX records are deleted then re-created. By repacking after re-indexing we ensure that the database ends up without extreme fragmentation.
This commit is contained in:
parent
f320e3a659
commit
4380a374c1
@ -1250,5 +1250,9 @@ int ltdb_reindex(struct ldb_module *module)
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
if (tdb_repack(ltdb->tdb) != 0) {
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
}
|
||||
|
||||
return LDB_SUCCESS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user