From 06630972e786c205a485693f66039cd9bb10dc9d Mon Sep 17 00:00:00 2001 From: Dan Lambright Date: Sun, 1 Nov 2015 10:22:00 -0500 Subject: cluster/tier correct promotion cycle calculation 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 Signed-off-by: Dan Lambright Reviewed-on: http://review.gluster.org/12480 Reviewed-by: Joseph Fernandes Tested-by: Gluster Build System --- tests/tier.rc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/tier.rc') 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 +} -- cgit