1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source4/smbd
Andrew Bartlett 8b18da27cf 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
2019-03-07 04:58:42 +00:00
..
process_model.c source4/smbd: replace DEBUG( with DBG_ 2017-10-19 05:33:10 +02:00
process_model.h source4 smbd prefork: restart on non zero exit code 2018-11-23 08:25:19 +01:00
process_prefork.c s4:smbd: Use #ifdef instead of #if for config.h definitions 2018-11-28 23:19:24 +01:00
process_single.c source4 smbd prefork: restart on non zero exit code 2018-11-23 08:25:19 +01:00
process_standard.c s4 smdb standard: Limit processes forked on accept. 2018-11-30 11:42:44 +01:00
server.c s4-server: Open and close a transaction on sam.ldb at startup 2019-03-07 04:58:42 +00:00
service_named_pipe.c source4/smbd: replace DEBUG( with DBG_ 2017-10-19 05:33:10 +02:00
service_stream.c source4 smbd prefork: restart on non zero exit code 2018-11-23 08:25:19 +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 prefork: restart on non zero exit code 2018-11-23 08:25:19 +01:00
service_task.h source4/smbd: refactor the process model for prefork 2017-10-19 05:33:09 +02:00
service.c source4 smdb: Add a post fork hook to the service API 2018-11-01 23:49:24 +01:00
service.h source4 smbd: pass instance number to post_fork 2018-11-07 17:55:09 +01:00
wscript_build source4/smbd: add a prefork process model. 2017-10-19 05:33:10 +02:00