-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rdb save incremental fsync #495
base: master
Are you sure you want to change the base?
Rdb save incremental fsync #495
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how this changes anything. If you are providing a non-undef
value to redis::rdb_save_incremental_fsync
, then it will render either rdb-save-incremental-fsync yes
or rdb-save-incremental-fsync no
.
To be sure, you could add a test like
puppet-redis/spec/classes/redis_spec.rb
Lines 1683 to 1691 in e8d71af
describe 'test rdb-save-incremental-fsync for redis6' do | |
let(:params) do | |
{ | |
rdb_save_incremental_fsync: true, | |
} | |
end | |
it { is_expected.to contain_file(config_file_orig).with('content' => %r{^rdb-save-incremental-fsync yes$}) } | |
end |
rdb_save_incremental_fsync
to false
and checks that the config files contains rdb-save-incremental-fsync no
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I see the problem now. The if $rdb_save_incremental_fsync
evaluates to false when you set rdb_save_incremental_fsync
to false, so the line doesn't get rendered. But your patch doesn't fix that bug.
I have corrected the Undef: no config file entry, aka "the default" which may have been "no" in the past but is now "yes" I have separately verified that this works as intended on a real-world instance. edit: i clearly do not now how to use rspec properly |
spec/classes/redis_spec.rb
Outdated
describe 'test rdb-save-incremental-fsync Undef for redis6' do | ||
let(:params) do | ||
{ | ||
rdb_save_incremental_fsync: Undef, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rdb_save_incremental_fsync: Undef, | |
rdb_save_incremental_fsync: nil, |
…ar with its behaviour
no matter what i do with the test, when i set:
as part of the rspec test, i can't get the test to pass in the Puppet/ruby stages. I don't see any other tests for |
Pull Request (PR) description
minor change to the
redis.conf
EPP template to make it possible to disablerdb_save_incremental_fsync
This Pull Request (PR) fixes the following issues
Fixes #494