Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
cc06c227
Commit
cc06c227
authored
Apr 26, 2019
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Fix the order of HSH_Fail() and ObjSetState()"
This reverts commit
501246e9
.
parent
f8ea5283
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
10 deletions
+5
-10
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+1
-0
cache_obj.c
bin/varnishd/cache/cache_obj.c
+2
-9
cache_varnishd.h
bin/varnishd/cache/cache_varnishd.h
+2
-1
No files found.
bin/varnishd/cache/cache_fetch.c
View file @
cc06c227
...
...
@@ -809,6 +809,7 @@ vbf_stp_fail(struct worker *wrk, const struct busyobj *bo)
assert
(
bo
->
fetch_objcore
->
boc
->
state
<
BOS_FINISHED
);
ObjSetState
(
wrk
,
bo
->
fetch_objcore
,
BOS_FAILED
);
HSH_Fail
(
bo
->
fetch_objcore
);
if
(
!
(
bo
->
fetch_objcore
->
flags
&
OC_F_BUSY
))
HSH_Kill
(
bo
->
fetch_objcore
);
return
(
F_STP_DONE
);
...
...
bin/varnishd/cache/cache_obj.c
View file @
cc06c227
...
...
@@ -84,7 +84,6 @@
#include <stdlib.h>
#include "cache_varnishd.h"
#include "cache_objhead.h"
#include "cache_obj.h"
#include "vend.h"
#include "storage/storage.h"
...
...
@@ -258,7 +257,8 @@ ObjWaitExtend(const struct worker *wrk, const struct objcore *oc, uint64_t l)
*/
void
ObjSetState
(
struct
worker
*
wrk
,
struct
objcore
*
oc
,
enum
boc_state_e
next
)
ObjSetState
(
struct
worker
*
wrk
,
const
struct
objcore
*
oc
,
enum
boc_state_e
next
)
{
const
struct
obj_methods
*
om
;
...
...
@@ -275,13 +275,6 @@ ObjSetState(struct worker *wrk, struct objcore *oc, enum boc_state_e next)
om
->
objsetstate
(
wrk
,
oc
,
next
);
}
if
(
next
==
BOS_FAILED
)
{
/* Signal to cache_hash.c that this object is failed. This
* needs to happen before we signal the boc so that code
* will see the OC_F_FAILED flag after ObjWaitState() */
HSH_Fail
(
oc
);
}
Lck_Lock
(
&
oc
->
boc
->
mtx
);
oc
->
boc
->
state
=
next
;
AZ
(
pthread_cond_broadcast
(
&
oc
->
boc
->
cond
));
...
...
bin/varnishd/cache/cache_varnishd.h
View file @
cc06c227
...
...
@@ -293,7 +293,8 @@ int ObjGetSpace(struct worker *, struct objcore *, ssize_t *sz, uint8_t **ptr);
void
ObjExtend
(
struct
worker
*
,
struct
objcore
*
,
ssize_t
l
);
uint64_t
ObjWaitExtend
(
const
struct
worker
*
,
const
struct
objcore
*
,
uint64_t
l
);
void
ObjSetState
(
struct
worker
*
,
struct
objcore
*
,
enum
boc_state_e
next
);
void
ObjSetState
(
struct
worker
*
,
const
struct
objcore
*
,
enum
boc_state_e
next
);
void
ObjWaitState
(
const
struct
objcore
*
,
enum
boc_state_e
want
);
void
ObjTrimStore
(
struct
worker
*
,
struct
objcore
*
);
void
ObjTouch
(
struct
worker
*
,
struct
objcore
*
,
vtim_real
now
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment