diff options
| author | Rich Megginson <rmeggins@redhat.com> | 2005-02-04 16:51:14 +0000 |
|---|---|---|
| committer | Rich Megginson <rmeggins@redhat.com> | 2005-02-04 16:51:14 +0000 |
| commit | 144f4ccaf2b16d012fd9360ebeadff7fdcbd103c (patch) | |
| tree | 6e0cb624e4fc11947c0649cd76369b0bcad4fdac /ldap/servers/plugins/replication/repl_extop.c | |
| parent | 023caab4bdc1d10c501bcb3aa888d5ebdffb10c5 (diff) | |
| download | ds-144f4ccaf2b16d012fd9360ebeadff7fdcbd103c.tar.gz ds-144f4ccaf2b16d012fd9360ebeadff7fdcbd103c.tar.xz ds-144f4ccaf2b16d012fd9360ebeadff7fdcbd103c.zip | |
Bug: 147157
Fix Description: There was already a flag to disable the tombstone reap
thread, but there was no way to set it from outside the replica code.
I added some functions to set the flag, and to query it to show it
in the status entry. When a total update request comes in, the flag
is set to disable, and when the total update ends for whatever reason
(success, error, connection terminated), the flag is set back to
enable.
In addition, the tombstone reap thread was being started after 1 hour -
this is too long and needed to be shorter. We already have the
tombstone reap interval, so I changed it so that the reap thread
starts after this interval, then runs after every interval elapses.
Diffstat (limited to 'ldap/servers/plugins/replication/repl_extop.c')
| -rw-r--r-- | ldap/servers/plugins/replication/repl_extop.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ldap/servers/plugins/replication/repl_extop.c b/ldap/servers/plugins/replication/repl_extop.c index b13ad6ac..f972f886 100644 --- a/ldap/servers/plugins/replication/repl_extop.c +++ b/ldap/servers/plugins/replication/repl_extop.c @@ -776,6 +776,10 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb) char *mtnstate = slapi_mtn_get_state(repl_root_sdn); char **mtnreferral = slapi_mtn_get_referral(repl_root_sdn); + /* richm 20041118 - we do not want to reap tombstones while there is + a total update in progress, so shut it down */ + replica_set_tombstone_reap_stop(replica, PR_TRUE); + /* richm 20010831 - set the mapping tree to the referral state *before* we invoke slapi_start_bulk_import - see bug 556992 - slapi_start_bulk_import sets the database offline, if an operation comes @@ -839,6 +843,9 @@ send_response: connid, opid, (replica ? slapi_sdn_get_dn(replica_get_root(replica)) : "unknown"), protocol_response2string (response), purlstr); + + /* enable tombstone reap again since the total update failed */ + replica_set_tombstone_reap_stop(replica, PR_FALSE); } /* Send the response */ if ((resp_bere = der_alloc()) == NULL) @@ -1043,6 +1050,10 @@ multimaster_extop_EndNSDS50ReplicationRequest(Slapi_PBlock *pb) /* ONREPL code that dealt with new RUV, etc was moved into the code that enables replication when a backend comes back online. This code is called once the bulk import is finished */ + + /* allow reaping again */ + replica_set_tombstone_reap_stop(r, PR_FALSE); + } else if (connext->repl_protocol_version == REPL_PROTOCOL_50_INCREMENTAL) { |
