r3048 - in trunk/varnish-cache: bin/varnishd include lib/libvcl

phk at projects.linpro.no phk at projects.linpro.no
Fri Aug 1 00:38:01 CEST 2008


Author: phk
Date: 2008-08-01 00:38:01 +0200 (Fri, 01 Aug 2008)
New Revision: 3048

Modified:
   trunk/varnish-cache/bin/varnishd/cache_center.c
   trunk/varnish-cache/bin/varnishd/mgt_vcc.c
   trunk/varnish-cache/include/vcl_returns.h
   trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
   trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl
Log:
Rename the vcl_fetch{} action "insert" to "deliver" as we may not
insert (for instance on pass) but we certainly will deliver (unless
error or restart actions are used instead).

Update the dotgraph to 2.0 intent



Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c	2008-07-31 14:59:58 UTC (rev 3047)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c	2008-07-31 22:38:01 UTC (rev 3048)
@@ -53,6 +53,7 @@
 DOT	label="Request received"
 DOT ]
 DOT ERROR [shape=plaintext]
+DOT RESTART [shape=plaintext]
 DOT acceptor -> start [style=bold,color=green,weight=4]
  */
 
@@ -122,12 +123,14 @@
 DOT	]
 DOT	deliver2 [
 DOT		shape=ellipse
-DOT		label="Send hdr + object"
+DOT		label="Send resp + body"
 DOT	]
 DOT	deliver -> vcl_deliver [style=bold,color=green,weight=4]
 DOT	vcl_deliver -> deliver2 [style=bold,color=green,weight=4,label=deliver]
 DOT     vcl_deliver -> errdeliver [label="error"]
 DOT     errdeliver [label="ERROR",shape=plaintext]
+DOT     vcl_deliver -> rstdeliver [label="restart",color=purple]
+DOT     rstdeliver [label="RESTART",shape=plaintext]
 DOT }
 DOT deliver2 -> DONE [style=bold,color=green,weight=4]
  *
@@ -289,13 +292,13 @@
  * Emit an error
  *
 DOT subgraph xcluster_error {
-DOT	error [
-DOT		shape=ellipse
-DOT		label="Issue HTTP error"
+DOT	vcl_error [
+DOT		shape=record
+DOT		label="vcl_error()|resp."
 DOT	]
-DOT	ERROR -> error
+DOT	ERROR -> vcl_error
+DOT	vcl_error-> deliver [label=deliver]
 DOT }
-DOT error -> DONE
  */
 
 static int
@@ -359,11 +362,14 @@
 DOT		shape=ellipse
 DOT		label="obj.pass=true"
 DOT	]
-DOT	vcl_fetch -> fetch_pass [label="pass"]
+DOT	vcl_fetch -> fetch_pass [label="pass",style=bold,color=red]
 DOT }
-DOT fetch_pass -> deliver
-DOT vcl_fetch -> deliver [label="insert",style=bold,color=blue,weight=2]
+DOT fetch_pass -> deliver [style=bold,color=red]
+DOT vcl_fetch -> deliver [label="deliver",style=bold,color=blue,weight=2]
 DOT vcl_fetch -> recv [label="restart"]
+DOT vcl_fetch -> rstfetch [label="restart",color=purple]
+DOT rstfetch [label="RESTART",shape=plaintext]
+DOT fetch -> errfetch 
 DOT vcl_fetch -> errfetch [label="error"]
 DOT errfetch [label="ERROR",shape=plaintext]
  */
@@ -422,7 +428,7 @@
 	case VCL_RET_PASS:
 		sp->obj->pass = 1;
 		break;
-	case VCL_RET_INSERT:
+	case VCL_RET_DELIVER:
 		break;
 	default:
 		INCOMPL();
@@ -499,7 +505,9 @@
 DOT }
 DOT hit -> err_hit [label="error"]
 DOT err_hit [label="ERROR",shape=plaintext]
-DOT hit -> pass [label=pass]
+DOT hit -> rst_hit [label="restart",color=purple]
+DOT rst_hit [label="RESTART",shape=plaintext]
+DOT hit -> pass [label=pass,style=bold,color=red]
 DOT hit -> deliver [label="deliver",style=bold,color=green,weight=4]
  */
 
@@ -564,7 +572,7 @@
 DOT	lookup -> lookup2 [label="yes",style=bold,color=green,weight=4]
 DOT }
 DOT lookup2 -> hit [label="no", style=bold,color=green,weight=4]
-DOT lookup2 -> pass [label="yes"]
+DOT lookup2 -> pass [label="yes",style=bold,color=red]
 DOT lookup -> miss [label="no",style=bold,color=blue,weight=2]
  */
 
@@ -658,10 +666,12 @@
 DOT	]
 DOT	miss -> vcl_miss [style=bold,color=blue,weight=2]
 DOT }
+DOT vcl_miss -> rst_miss [label="restart",color=purple]
+DOT rst_miss [label="RESTART",shape=plaintext]
 DOT vcl_miss -> err_miss [label="error"]
 DOT err_miss [label="ERROR",shape=plaintext]
 DOT vcl_miss -> fetch [label="fetch",style=bold,color=blue,weight=2]
-DOT vcl_miss -> pass [label="pass"]
+DOT vcl_miss -> pass [label="pass",style=bold,color=red]
 DOT
  */
 
@@ -725,11 +735,13 @@
 DOT		shape=ellipse
 DOT		label="create anon object\n"
 DOT	]
-DOT	pass -> pass2
-DOT	pass2 -> vcl_pass
-DOT	vcl_pass -> pass_do [label="pass"]
+DOT	pass -> pass2 [style=bold, color=red]
+DOT	pass2 -> vcl_pass [style=bold, color=red]
+DOT	vcl_pass -> pass_do [label="pass"] [style=bold, color=red]
 DOT }
-DOT pass_do -> fetch
+DOT pass_do -> fetch [style=bold, color=red]
+DOT vcl_pass -> rst_pass [label="restart",color=purple]
+DOT rst_pass [label="RESTART",shape=plaintext]
 DOT vcl_pass -> err_pass [label="error"]
 DOT err_pass [label="ERROR",shape=plaintext]
  */
@@ -776,10 +788,10 @@
 DOT		shape=ellipse
 DOT		label="send bereq.\npipe until close"
 DOT	]
-DOT	vcl_pipe -> pipe_do [label="pipe"]
-DOT	pipe -> vcl_pipe
+DOT	vcl_pipe -> pipe_do [label="pipe",style=bold,color=orange]
+DOT	pipe -> vcl_pipe [style=bold,color=orange]
 DOT }
-DOT pipe_do -> DONE
+DOT pipe_do -> DONE [style=bold,color=orange]
 DOT vcl_pipe -> err_pipe [label="error"]
 DOT err_pipe [label="ERROR",shape=plaintext]
  */
@@ -816,8 +828,9 @@
 DOT		label="vcl_recv()|req."
 DOT	]
 DOT }
-DOT recv -> pipe [label="pipe"]
-DOT recv -> pass2 [label="pass"]
+DOT RESTART -> recv
+DOT recv -> pipe [label="pipe",style=bold,color=orange]
+DOT recv -> pass2 [label="pass",style=bold,color=red]
 DOT recv -> err_recv [label="error"]
 DOT err_recv [label="ERROR",shape=plaintext]
 DOT recv -> hash [label="lookup",style=bold,color=green,weight=4]

Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_vcc.c	2008-07-31 14:59:58 UTC (rev 3047)
+++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c	2008-07-31 22:38:01 UTC (rev 3048)
@@ -142,7 +142,7 @@
     "        pass;\n"
     "    }\n"
     "	 set obj.prefetch =  -30s;"
-    "    insert;\n"
+    "    deliver;\n"
     "}\n"
     "sub vcl_deliver {\n"
     "    deliver;\n"

Modified: trunk/varnish-cache/include/vcl_returns.h
===================================================================
--- trunk/varnish-cache/include/vcl_returns.h	2008-07-31 14:59:58 UTC (rev 3047)
+++ trunk/varnish-cache/include/vcl_returns.h	2008-07-31 22:38:01 UTC (rev 3048)
@@ -15,11 +15,10 @@
 VCL_RET_MAC(pipe, PIPE, (1 << 3), 3)
 VCL_RET_MAC(pass, PASS, (1 << 4), 4)
 VCL_RET_MAC(fetch, FETCH, (1 << 5), 5)
-VCL_RET_MAC(insert, INSERT, (1 << 6), 6)
-VCL_RET_MAC(deliver, DELIVER, (1 << 7), 7)
-VCL_RET_MAC(discard, DISCARD, (1 << 8), 8)
-VCL_RET_MAC(keep, KEEP, (1 << 9), 9)
-VCL_RET_MAC(restart, RESTART, (1 << 10), 10)
+VCL_RET_MAC(deliver, DELIVER, (1 << 6), 6)
+VCL_RET_MAC(discard, DISCARD, (1 << 7), 7)
+VCL_RET_MAC(keep, KEEP, (1 << 8), 8)
+VCL_RET_MAC(restart, RESTART, (1 << 9), 9)
 #else
 #define VCL_RET_ERROR  (1 << 0)
 #define VCL_RET_LOOKUP  (1 << 1)
@@ -27,22 +26,21 @@
 #define VCL_RET_PIPE  (1 << 3)
 #define VCL_RET_PASS  (1 << 4)
 #define VCL_RET_FETCH  (1 << 5)
-#define VCL_RET_INSERT  (1 << 6)
-#define VCL_RET_DELIVER  (1 << 7)
-#define VCL_RET_DISCARD  (1 << 8)
-#define VCL_RET_KEEP  (1 << 9)
-#define VCL_RET_RESTART  (1 << 10)
-#define VCL_RET_MAX 11
+#define VCL_RET_DELIVER  (1 << 6)
+#define VCL_RET_DISCARD  (1 << 7)
+#define VCL_RET_KEEP  (1 << 8)
+#define VCL_RET_RESTART  (1 << 9)
+#define VCL_RET_MAX 10
 #endif
 
 #ifdef VCL_MET_MAC
-VCL_MET_MAC(recv,RECV,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_PIPE|VCL_RET_LOOKUP))
-VCL_MET_MAC(pipe,PIPE,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PIPE))
+VCL_MET_MAC(recv,RECV,(VCL_RET_ERROR|VCL_RET_PASS|VCL_RET_PIPE|VCL_RET_LOOKUP))
+VCL_MET_MAC(pipe,PIPE,(VCL_RET_ERROR|VCL_RET_PIPE))
 VCL_MET_MAC(pass,PASS,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS))
 VCL_MET_MAC(hash,HASH,(VCL_RET_HASH))
 VCL_MET_MAC(miss,MISS,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_FETCH))
 VCL_MET_MAC(hit,HIT,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_DELIVER))
-VCL_MET_MAC(fetch,FETCH,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_INSERT))
+VCL_MET_MAC(fetch,FETCH,(VCL_RET_ERROR|VCL_RET_RESTART|VCL_RET_PASS|VCL_RET_DELIVER))
 VCL_MET_MAC(deliver,DELIVER,(VCL_RET_RESTART|VCL_RET_DELIVER))
 VCL_MET_MAC(prefetch,PREFETCH,(VCL_RET_FETCH|VCL_RET_PASS))
 VCL_MET_MAC(timeout,TIMEOUT,(VCL_RET_FETCH|VCL_RET_DISCARD))

Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c	2008-07-31 14:59:58 UTC (rev 3047)
+++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c	2008-07-31 22:38:01 UTC (rev 3048)
@@ -225,11 +225,10 @@
 	vsb_cat(sb, "#define VCL_RET_PIPE  (1 << 3)\n");
 	vsb_cat(sb, "#define VCL_RET_PASS  (1 << 4)\n");
 	vsb_cat(sb, "#define VCL_RET_FETCH  (1 << 5)\n");
-	vsb_cat(sb, "#define VCL_RET_INSERT  (1 << 6)\n");
-	vsb_cat(sb, "#define VCL_RET_DELIVER  (1 << 7)\n");
-	vsb_cat(sb, "#define VCL_RET_DISCARD  (1 << 8)\n");
-	vsb_cat(sb, "#define VCL_RET_KEEP  (1 << 9)\n");
-	vsb_cat(sb, "#define VCL_RET_RESTART  (1 << 10)\n");
+	vsb_cat(sb, "#define VCL_RET_DELIVER  (1 << 6)\n");
+	vsb_cat(sb, "#define VCL_RET_DISCARD  (1 << 7)\n");
+	vsb_cat(sb, "#define VCL_RET_KEEP  (1 << 8)\n");
+	vsb_cat(sb, "#define VCL_RET_RESTART  (1 << 9)\n");
 	vsb_cat(sb, "/*\n");
 	vsb_cat(sb, " * $Id$\n");
 	vsb_cat(sb, " *\n");
@@ -487,8 +486,6 @@
 	vsb_cat(sb, "void VRT_l_obj_status(const struct sess *, int);\n");
 	vsb_cat(sb, "const char * VRT_r_obj_response(const struct sess *);\n");
 	vsb_cat(sb, "void VRT_l_obj_response(const struct sess *, const char *, ...);\n");
-	vsb_cat(sb, "unsigned VRT_r_obj_valid(const struct sess *);\n");
-	vsb_cat(sb, "void VRT_l_obj_valid(const struct sess *, unsigned);\n");
 	vsb_cat(sb, "unsigned VRT_r_obj_cacheable(const struct sess *);\n");
 	vsb_cat(sb, "void VRT_l_obj_cacheable(const struct sess *, unsigned);\n");
 	vsb_cat(sb, "double VRT_r_obj_ttl(const struct sess *);\n");

Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl	2008-07-31 14:59:58 UTC (rev 3047)
+++ trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl	2008-07-31 22:38:01 UTC (rev 3048)
@@ -34,13 +34,13 @@
 # Second element is list of valid return actions.
 #
 set methods {
-	{recv		{error restart pass pipe lookup}}
-	{pipe		{error restart pipe}}
+	{recv		{error pass pipe lookup}}
+	{pipe		{error pipe}}
 	{pass		{error restart pass}}
 	{hash		{hash}}
 	{miss		{error restart pass fetch}}
 	{hit		{error restart pass deliver}}
-	{fetch		{error restart pass insert}}
+	{fetch		{error restart pass deliver}}
 	{deliver	{restart deliver}}
 	{prefetch	{fetch pass}}
 	{timeout	{fetch discard}}
@@ -57,7 +57,6 @@
 	pipe
 	pass
 	fetch
-	insert
 	deliver
 	discard
 	keep




More information about the varnish-commit mailing list