diff options
author | Dan Lambright <dlambrig@redhat.com> | 2015-11-01 10:22:00 -0500 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2015-11-07 13:44:38 -0800 |
commit | 5b989f034d522ffe8c311481b7ef2064358cb06f (patch) | |
tree | 9fd1feba9c3a71b361c66240ff13c79f17f4de88 /tests/tier.rc | |
parent | f3b555e029e6531d914fb67e098929ffe03d161b (diff) |
cluster/tier correct promotion cycle calculation
This is a backport of 12480
The tier translator should only choose candidate files for promotion
from the most recent cycle, not a multiple of the most recent cycles.
Otherwise user observed behavior can be inconsistent. Remove related
test in tier.t that is subject to race condition.
> Change-Id: I9ad1523cac00f904097ce468efa6ddd515857024
> BUG: 1275524
> Signed-off-by: root <root@rhs-cli-15.gdev.lab.eng.bos.redhat.com>
> Signed-off-by: Dan Lambright <dlambrig@redhat.com>
> Reviewed-on: http://review.gluster.org/12480
> Reviewed-by: Joseph Fernandes
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Conflicts:
tests/basic/tier/tier.t
xlators/cluster/dht/src/tier.c
Change-Id: Ic4587bf1b5d26ba377a12a4ce8e329362988a33b
BUG: 1275483
Reviewed-on: http://review.gluster.org/12536
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'tests/tier.rc')
-rw-r--r-- | tests/tier.rc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/tier.rc b/tests/tier.rc index 3fa6af6a40f..4fd24de0659 100644 --- a/tests/tier.rc +++ b/tests/tier.rc @@ -99,3 +99,16 @@ function confirm_vol_stopped { fi } + +function sleep_first_cycle { + startTime=$(date +%s) + mod=$(( ( $startTime % $1 ) + 1 )) + sleep $mod +} + +function sleep_until_mid_cycle { + startTime=$(date +%s) + mod=$(( ( $startTime % $1 ) + 1 )) + mod=$(( $mod + $1 / 2 )) + sleep $mod +} |