File: cache_fetch.dot

package info (click to toggle)
varnish 7.7.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 13,280 kB
  • sloc: ansic: 104,222; python: 2,679; makefile: 1,297; sh: 1,077; awk: 114; perl: 105; ruby: 41
file content (120 lines) | stat: -rw-r--r-- 3,549 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
 * we should format labels in a readable form like
 *			    label="
 *			    {vbf_stp_startfetch:|
 *				    {vcl_backend_fetch\{\}|bereq.*}|
 *				    {abandon|
 *					    <fetch>fetch}}"
 *
 * <rant>
 * ... but some servers in the v-c.o build farm use old graphviz 2.26.3
 * which cannot handle labels with additional whitespace properly, so
 * for the time being we need to fall back into dark middle ages and
 * use illegibly long lines
 * </rant>
 * -- slink 20141013
 */

digraph cache_fetch {
	margin="0.5"
	center="1"

	/*** cache_fetch.c ***/
	subgraph cluster_backend {
		style=filled
		color=aliceblue
		RETRY [shape=plaintext]
		v_b_f_BGFETCH [label="BGFETCH",
			       shape=box,
			       style=filled,
			       color=turquoise]
		v_b_f_FETCH [label="FETCH",
			       shape=box,
			       style=filled,
			       color=turquoise]
		v_b_f_BGFETCH -> v_b_f [style=bold,color=green]
		v_b_f_FETCH -> v_b_f [style=bold,color=blue]
		v_b_f_FETCH -> v_b_f [style=bold,color=red]
		RETRY -> v_b_f [color=purple]
		/* vbf_stp_startfetch() */
		v_b_f [
			    shape=record
			    label="{vbf_stp_startfetch:|{vcl_backend_fetch\{\}|bereq.*}|{<error>error|fail|abandon|<fetch>fetch}}"
		]
		v_b_f:error:s -> v_b_e
		v_b_f:fetch:s -> v_b_hdrs [style=bold]
		v_b_hdrs [ label="send bereq,\nread beresp (headers)"]
		v_b_hdrs -> v_b_r [style=bold]
		v_b_hdrs -> v_b_e
		v_b_r [
			    shape=record
			    label="{vbf_stp_startfetch:|{vcl_backend_response\{\}|{bereq.*|beresp.*}}|{<error>error|fail|{retry|{<max>max?|<retry>ok?}}|abandon|{deliver or pass|{<fetch_304>304?|<non_304>other?}}}}"
		]
		v_b_r:error:s -> v_b_e
		v_b_r:retry -> v_b_r_retry [color=purple]
		v_b_r:max -> v_b_e
		v_b_r:fetch_304:s -> vbf_stp_condfetch
		v_b_r:non_304:s -> vbf_stp_fetch

		v_b_r_retry [label="RETRY",shape=plaintext]

		vbf_stp_fetchbody [
			       shape=record
			       fontcolor=grey
			       color=grey
			       label="{vbf_stp_fetchbody:|get storage|read body, run VFPs|{fetch_fail?|error?|<ok>ok?}}"
			       ]
		vbf_stp_fetchbody:ok:s -> vbf_stp_fetchend

		vbf_stp_fetch [
			       shape=record
			       fontcolor=grey
			       color=grey
			       label="{vbf_stp_fetch:|setup VFPs|get object|{error?|<body>body?}}"
			       ]
		vbf_stp_fetch:body:s -> vbf_stp_fetchbody
		vbf_stp_fetch:body:s -> vbf_stp_fetchend

		vbf_stp_fetchend [
			       shape=record
			       fontcolor=grey
			       color=grey
			       label="{vbf_stp_fetchend:|finalize object and director|<done>done}"
			       ]
		vbf_stp_fetchend:done:s -> FETCH_DONE

		vbf_stp_condfetch [
			       shape=record
			       fontcolor=grey
			       color=grey
			       label="{vbf_stp_condfetch:|copy obj attr|steal body|{fetch_fail?|<ok>ok?}}"

		]
		vbf_stp_condfetch:ok:s -> vbf_stp_fetchend

		fail [shape=plaintext]
		fail -> FETCH_FAIL

		/* vbf_stp_error */
		v_b_e [
			    shape=record
			    label="{vbf_stp_error:|{vcl_backend_error\{\}|{bereq.*|beresp.*}}|{{retry|{<fail>fail|<max>max?|<retry>ok?}}|abandon|<deliver>deliver}}}"
			    ]
		// v_b_e:deliver aka "backend synth" - goes into cache
		v_b_e:deliver -> FETCH_DONE [label="\"backend synth\""]
		v_b_e:retry -> v_b_e_retry [color=purple]
		v_b_e_retry [label="RETRY",shape=plaintext]
		v_b_e:max:s -> FETCH_FAIL

		v_b_e_retry [label="RETRY",shape=plaintext]

		FETCH_DONE [label="FETCH_DONE",
			    shape=box,style=filled,color=turquoise]

		abandon [shape=plaintext]
		abandon -> FETCH_FAIL
		// F_STP_FAIL
		FETCH_FAIL [label="FETCH_FAIL",
			    shape=box,style=filled,color=turquoise]
	}
}