Commit 0f8c3f0f authored by Nils Goroll's avatar Nils Goroll

minor cleanups

parent bd7505c0
Pipeline #26 skipped
/*- /*-
* Copyright 2016 UPLEX - Nils Goroll Systemoptimierung * Copyright 2009-2016 UPLEX - Nils Goroll Systemoptimierung
* All rights reserved. * 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 * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
...@@ -50,7 +51,7 @@ enum shard_change_task_e { ...@@ -50,7 +51,7 @@ enum shard_change_task_e {
struct shard_change_task { struct shard_change_task {
unsigned magic; unsigned magic;
#define SHARD_CHANGE_TASK_MAGIC 0x1e1168af #define SHARD_CHANGE_TASK_MAGIC 0x1e1168af
enum shard_change_task_e task; enum shard_change_task_e task;
void *priv; void *priv;
VSTAILQ_ENTRY(shard_change_task) list; VSTAILQ_ENTRY(shard_change_task) list;
......
...@@ -278,8 +278,12 @@ init_state(struct shard_state *state, ...@@ -278,8 +278,12 @@ init_state(struct shard_state *state,
* which probably is, for all practical purposes, only relevant when the * which probably is, for all practical purposes, only relevant when the
* saintmode vmod is used * saintmode vmod is used
* *
* on the other hand, if we wanted to postpone pick_be until backend conncetion * if we wanted to offer delayed resolution, we'd need something like
* time, we'd need to keep per-request per-director state * 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 VCL_BACKEND
......
...@@ -64,7 +64,7 @@ struct sharddir { ...@@ -64,7 +64,7 @@ struct sharddir {
VCL_DURATION rampup_duration; VCL_DURATION rampup_duration;
VCL_REAL warmup; VCL_REAL warmup;
VCL_INT replicas; VCL_INT replicas;
}; };
static inline VCL_BACKEND static inline VCL_BACKEND
......
...@@ -67,9 +67,9 @@ shard_hash_sha256(VCL_STRING s) ...@@ -67,9 +67,9 @@ shard_hash_sha256(VCL_STRING s)
SHA256_Final(sha256_digest.digest, &sha256); SHA256_Final(sha256_digest.digest, &sha256);
/* /*
* use low 32 bits only * use low 32 bits only
* XXX: Are these the best bits to pick? * XXX: Are these the best bits to pick?
*/ */
return (sha256_digest.uint32_digest[7]); return (sha256_digest.uint32_digest[7]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment