Skip to content

Commit 181c9d9

Browse files
authored
Merge pull request #5256 from lindig/master
CA-384148 enable logging for redo_log_alert
2 parents c9f2cbd + 17016b6 commit 181c9d9

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

ocaml/database/db_globs.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ let redo_log_max_dying_processes = 2
3535
let redo_log_comms_socket_stem = "sock-blkdev-io"
3636

3737
(** The maximum time, in seconds, for which we are prepared to wait for a response from the block device I/O process before assuming that it has died while initially connecting to it *)
38-
let redo_log_max_startup_time = ref 10.
38+
let redo_log_max_startup_time = ref 5.
3939

4040
(** The length, in bytes, of one redo log which constitutes half of the VDI *)
4141
let redo_log_length_of_half = 60 * 1024 * 1024

ocaml/database/redo_log.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ let disable log =
123123
let redo_log_events = Event.new_channel ()
124124

125125
let cannot_connect_fn log =
126+
D.debug "%s" __FUNCTION__ ;
126127
if !(log.currently_accessible) then (
127128
D.debug "Signalling unable to access redo log" ;
128129
Event.sync (Event.send redo_log_events (log.name, false)) ;
@@ -131,6 +132,7 @@ let cannot_connect_fn log =
131132
log.currently_accessible := false
132133

133134
let can_connect_fn log =
135+
D.debug "%s" __FUNCTION__ ;
134136
if not !(log.currently_accessible) then (
135137
D.debug "Signalling redo log is healthy" ;
136138
Event.sync (Event.send redo_log_events (log.name, true)) ;
@@ -611,18 +613,19 @@ let shutdown log =
611613
)
612614

613615
let broken log =
616+
D.debug "%s" __FUNCTION__ ;
614617
set_time_of_last_failure log ;
615618
shutdown log ;
616619
cannot_connect_fn log
617620

618621
let healthy log =
622+
D.debug "%s" __FUNCTION__ ;
619623
reset_time_of_last_failure log ;
620624
can_connect_fn log
621625

622626
exception TooManyProcesses
623627

624628
let startup log =
625-
with_lock log.mutex @@ fun () ->
626629
if is_enabled log then (
627630
try
628631
( match !(log.pid) with

ocaml/xapi/redo_log_alert.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* GNU Lesser General Public License for more details.
1313
*)
1414

15-
module R = Debug.Make (struct let name = "redo_log" end)
15+
module R = Debug.Make (struct let name = __MODULE__ end)
1616

1717
open R
1818

0 commit comments

Comments
 (0)