mirror of
https://github.com/samba-team/samba.git
synced 2025-03-03 12:58:35 +03:00
Revert "ctdb-readonly: Avoid a tight loop waiting for revoke to complete"
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12697 This reverts commit ad758cb869ac83534993caa212abc9fe9905ec68. This is an incomplete fix and introduces a regression. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
02a76d86db
commit
a50b25d0eb
@ -1609,6 +1609,7 @@ static int deferred_call_destructor(struct revokechild_deferred_call *deferred_c
|
||||
{
|
||||
struct ctdb_context *ctdb = deferred_call->ctdb;
|
||||
struct revokechild_requeue_handle *requeue_handle = talloc(ctdb, struct revokechild_requeue_handle);
|
||||
struct ctdb_req_call_old *c = (struct ctdb_req_call_old *)deferred_call->hdr;
|
||||
|
||||
requeue_handle->ctdb = ctdb;
|
||||
requeue_handle->hdr = deferred_call->hdr;
|
||||
@ -1616,12 +1617,9 @@ static int deferred_call_destructor(struct revokechild_deferred_call *deferred_c
|
||||
requeue_handle->ctx = deferred_call->ctx;
|
||||
talloc_steal(requeue_handle, requeue_handle->hdr);
|
||||
|
||||
/* Always delay revoke requests. Either wait for the read/write
|
||||
* operation to complete, or if revoking failed wait for recovery to
|
||||
* complete
|
||||
*/
|
||||
/* when revoking, any READONLY requests have 1 second grace to let read/write finish first */
|
||||
tevent_add_timer(ctdb->ev, requeue_handle,
|
||||
timeval_current_ofs(1, 0),
|
||||
timeval_current_ofs(c->flags & CTDB_WANT_READONLY ? 1 : 0, 0),
|
||||
deferred_call_requeue, requeue_handle);
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user