Red Hat Bugzilla – Bug 1284067
Data Tiering:Don't allow or reset the frequency threshold values to zero when record counter features.record-counter is turned off
Last modified: 2016-09-17 11:37:35 EDT
Description of problem:
When a user turns on record counter and changes the write and read freq to some value of his desire, say 3. It means the files will not be migrated until that many times file is accessed.
But now for some reason, if the user turns of the features.record-counter , then there will not be any more promotes/demotes as the db will not be recording the counts and as the threshold will never be hit, the promotes/demotes will never happen
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.create a tier setup
2.turn on features.record-counter
3.now set the thresholds to some value(which by default are zero) say 3 as below:
hence files which are not read/written 3 times in a cycle will not be promoted and files read more than that will not be demoted.
4. Now turn off record-counter(this means the db will stop increasing the db tickers.
Now this means, files will not be promoted/demoted till threshold is hit, but db would not be recording the counts, hence a file will never be migrated
turn the theshold values to zero when counter is off.
Else, throw a warning to change the threshold values, while the user tries to turn off the counter
Possible Workaround be to document the limitation and suggest the user to change the threshold values whenever counter is turned off
(In reply to nchilaka from comment #2)
> Possible Workaround be to document the limitation and suggest the user to
> change the threshold values whenever counter is turned off
upstream patch http://review.gluster.org/#/c/12780
1) if record-counters is set to off
check if both the frequency thresholds are non-zero, then pop
an error message, with volume set failed.
2) if record-counters is set to on
check if both the frequency thresholds are zero, then pop
an note, but volume set is not failed.
3) If any of the frequency thresholds are set to a non-zero value,
switch record-counters on, if not already on
4) If both the frequency thresholds are set to zero,
switch record-counters off, if not already off
Fixed in https://code.engineering.redhat.com/gerrit/#/c/62812/