Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-vslp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-vslp
Commits
0f8c3f0f
Commit
0f8c3f0f
authored
Sep 12, 2016
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor cleanups
parent
bd7505c0
Pipeline
#26
skipped
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
9 deletions
+14
-9
shard_cfg.c
src/shard_cfg.c
+4
-3
shard_dir.c
src/shard_dir.c
+6
-2
shard_dir.h
src/shard_dir.h
+1
-1
shard_hash.c
src/shard_hash.c
+3
-3
No files found.
src/shard_cfg.c
View file @
0f8c3f0f
/*-
* Copyright 2016 UPLEX - Nils Goroll Systemoptimierung
* Copyright 20
09-20
16 UPLEX - Nils Goroll Systemoptimierung
* All rights reserved.
*
* Author: Nils Goroll <nils.goroll@uplex.de>
* Authors: Nils Goroll <nils.goroll@uplex.de>
* Geoffrey Simmons <geoff@uplex.de>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -50,7 +51,7 @@ enum shard_change_task_e {
struct
shard_change_task
{
unsigned
magic
;
#define SHARD_CHANGE_TASK_MAGIC 0x1e1168af
#define SHARD_CHANGE_TASK_MAGIC
0x1e1168af
enum
shard_change_task_e
task
;
void
*
priv
;
VSTAILQ_ENTRY
(
shard_change_task
)
list
;
...
...
src/shard_dir.c
View file @
0f8c3f0f
...
...
@@ -278,8 +278,12 @@ init_state(struct shard_state *state,
* which probably is, for all practical purposes, only relevant when the
* saintmode vmod is used
*
* on the other hand, if we wanted to postpone pick_be until backend conncetion
* time, we'd need to keep per-request per-director state
* if we wanted to offer delayed resolution, we'd need something like
* per-request per-director state or we'd need to return a dynamically created
* director object. That should be straight forward once we got director
* refcounting #2072. Until then, we could create it on the workspace, but then
* we'd need to keep other directors from storing any references to our dynamic
* object for longer than the current task
*
*/
VCL_BACKEND
...
...
src/shard_dir.h
View file @
0f8c3f0f
...
...
@@ -64,7 +64,7 @@ struct sharddir {
VCL_DURATION
rampup_duration
;
VCL_REAL
warmup
;
VCL_INT
replicas
;
VCL_INT
replicas
;
};
static
inline
VCL_BACKEND
...
...
src/shard_hash.c
View file @
0f8c3f0f
...
...
@@ -67,9 +67,9 @@ shard_hash_sha256(VCL_STRING s)
SHA256_Final
(
sha256_digest
.
digest
,
&
sha256
);
/*
* use low 32 bits only
* XXX: Are these the best bits to pick?
*/
* use low 32 bits only
* XXX: Are these the best bits to pick?
*/
return
(
sha256_digest
.
uint32_digest
[
7
]);
}
...
...
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