1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-06 13:18:07 +03:00
samba-mirror/source4/smbd
Andrew Bartlett f8748b8bfc s4-server: Open and close a transaction on sam.ldb at startup
This fixes upgrading from 4.7 and earlier releases, and makes the DB
reindexing more transparent. It should also make it easier to handle
future normalisation rule changes, e.g. if we change the pack-format
of integer indexes in a future release.

Without this change, the  should have still handled reindexing the
database. We don't know why exactly this wasn't happening correctly,
but opening a transaction early in the samba process startup should
now guarantee that the DB is correctly reindexed by the time the main
samba code runs.

An alternative fix would have been to open a transaction in the the
DSDB module stack every time we connect to the database. However, this
would add an extra write lock every time we open the DB, whereas
starting samba happens much more infrequently.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13760

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Mar  7 04:58:42 UTC 2019 on sn-devel-144

(cherry picked from commit 8b18da27cf)
2019-03-11 08:59:33 +00:00
..
process_model.c source4/smbd: replace DEBUG( with DBG_ 2017-10-19 05:33:10 +02:00
process_model.h source4/smbd: refactor the process model for prefork 2017-10-19 05:33:09 +02:00
process_prefork.c samba: Fix CID 1420179 Code maintainability issues UNUSED_VALUE 2017-10-27 20:33:25 +02:00
process_single.c source4/smbd: replace DEBUG( with DBG_ 2017-10-19 05:33:10 +02:00
process_standard.c source4/smbd: replace DEBUG( with DBG_ 2017-10-19 05:33:10 +02:00
server.c s4-server: Open and close a transaction on sam.ldb at startup 2019-03-11 08:59:33 +00:00
service_named_pipe.c source4/smbd: replace DEBUG( with DBG_ 2017-10-19 05:33:10 +02:00
service_stream.c libsocket: Add "mem_ctx" to socket_create() 2018-02-27 09:14:17 +01:00
service_stream.h source4/smbd: refactor the process model for prefork 2017-10-19 05:33:09 +02:00
service_task.c source4/smbd: replace DEBUG( with DBG_ 2017-10-19 05:33:10 +02:00
service_task.h source4/smbd: refactor the process model for prefork 2017-10-19 05:33:09 +02:00
service.c source4/smbd: replace DEBUG( with DBG_ 2017-10-19 05:33:10 +02:00
service.h source4/smbd: refactor the process model for prefork 2017-10-19 05:33:09 +02:00
wscript_build source4/smbd: add a prefork process model. 2017-10-19 05:33:10 +02:00