Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rdb save incremental fsync #495

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c261392
make it possible to turn off rdb-save-incremental-fsync
thejambavan Nov 8, 2023
28af3ce
make it possible to turn off rdb-save-incremental-fsync
thejambavan Nov 8, 2023
2d4375c
wrap in an `if` to account for `undef`
thejambavan Nov 9, 2023
52e777e
comparison to Undef and test
thejambavan Nov 10, 2023
75f2e7c
comparison to Undef and test (fix typo)
thejambavan Nov 10, 2023
8453017
rspec formatting
thejambavan Nov 10, 2023
88179d2
rspec formatting
thejambavan Nov 10, 2023
d59524b
rspec test for Undef
thejambavan Nov 10, 2023
a6db2e7
rspec formatting
thejambavan Nov 10, 2023
98b7504
minot commit bump to trigger CI
thejambavan Nov 16, 2023
c4e308e
Undef -> nil in spec
thejambavan Nov 16, 2023
5cbb8fe
Merge branch 'master' into rdb-save-incremental-fsync
thejambavan Nov 16, 2023
757e9d9
attempt test for negation using regex rather than as i am less famil…
thejambavan Nov 16, 2023
440a70c
perhaps i want instead
thejambavan Nov 16, 2023
5e2f74b
maybe i made an infocorrect assumption in the EPP template
thejambavan Nov 16, 2023
c5b865a
sometimes it can be a string
thejambavan Nov 16, 2023
442dfdc
reorder tests to test undef/nil variant first
thejambavan Nov 16, 2023
01d5160
reorder tests to test undef/nil variant first
thejambavan Nov 16, 2023
976ad0a
reorder tests to test undef/nil variant first
thejambavan Nov 16, 2023
52fe4a7
misspelled as rdb_save_incremental_fsync
thejambavan Nov 16, 2023
2fe204b
easier to test for a commented-out line
thejambavan Nov 16, 2023
cd91071
easier to test for a commented-out line
thejambavan Nov 16, 2023
0fa6900
easier to test for a commented-out line
thejambavan Nov 16, 2023
00a1d33
i give up on this test. It works in reality, I could really do with a…
thejambavan Nov 16, 2023
64a690c
i give up on this test. It works in reality, I could really do with a…
thejambavan Nov 16, 2023
a7f18d2
last idea: undef-as-string https://github.com/rodjek/rspec-puppet/iss…
thejambavan Nov 16, 2023
8a6d21e
last idea: undef-as-string https://github.com/rodjek/rspec-puppet/iss…
thejambavan Nov 16, 2023
d101011
i give up on this test. It works in reality, I could really do with a…
thejambavan Nov 16, 2023
58af36c
bump to trigger tests
thejambavan Nov 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion spec/classes/redis_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@
}
end

describe 'test rdb-save-incremental-fsync for redis6' do
describe 'test rdb-save-incremental-fsync enabled for redis6' do
let(:params) do
{
rdb_save_incremental_fsync: true,
Expand All @@ -1690,6 +1690,26 @@
it { is_expected.to contain_file(config_file_orig).with('content' => %r{^rdb-save-incremental-fsync yes$}) }
end

describe 'test rdb-save-incremental-fsync disabled for redis6' do
let(:params) do
{
rdb_save_incremental_fsync: false,
}
end

it { is_expected.to contain_file(config_file_orig).with('content' => %r{^rdb-save-incremental-fsync no$}) }
end

describe 'test rdb-save-incremental-fsync Undef for redis6' do
let(:params) do
{
rdb_save_incremental_fsync: Undef,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rdb_save_incremental_fsync: Undef,
rdb_save_incremental_fsync: nil,

}
end

it { is_expected.not_to contain_file(config_file_orig).with('content' => %r{^rdb-save-incremental-fsync}) }

Check failure on line 1710 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on centos-7-x86_64 test rdb-save-incremental-fsync Undef for redis6 is expected not to contain File[/etc/redis.conf.puppet] with content =~ /^rdb-save-incremental-fsync/ Failure/Error: rdb_save_incremental_fsync: Undef, NameError: uninitialized constant Undef

Check failure on line 1710 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on ubuntu-20.04-x86_64 test rdb-save-incremental-fsync Undef for redis6 is expected not to contain File[/etc/redis/redis.conf.puppet] with content =~ /^rdb-save-incremental-fsync/ Failure/Error: rdb_save_incremental_fsync: Undef, NameError: uninitialized constant Undef

Check failure on line 1710 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on centos-9-x86_64 test rdb-save-incremental-fsync Undef for redis6 is expected not to contain File[/etc/redis/redis.conf.puppet] with content =~ /^rdb-save-incremental-fsync/ Failure/Error: rdb_save_incremental_fsync: Undef, NameError: uninitialized constant Undef

Check failure on line 1710 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on rocky-9-x86_64 test rdb-save-incremental-fsync Undef for redis6 is expected not to contain File[/etc/redis/redis.conf.puppet] with content =~ /^rdb-save-incremental-fsync/ Failure/Error: rdb_save_incremental_fsync: Undef, NameError: uninitialized constant Undef

Check failure on line 1710 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on centos-8-x86_64 test rdb-save-incremental-fsync Undef for redis6 is expected not to contain File[/etc/redis.conf.puppet] with content =~ /^rdb-save-incremental-fsync/ Failure/Error: rdb_save_incremental_fsync: Undef, NameError: uninitialized constant Undef

Check failure on line 1710 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on redhat-9-x86_64 test rdb-save-incremental-fsync Undef for redis6 is expected not to contain File[/etc/redis/redis.conf.puppet] with content =~ /^rdb-save-incremental-fsync/ Failure/Error: rdb_save_incremental_fsync: Undef, NameError: uninitialized constant Undef

Check failure on line 1710 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on redhat-8-x86_64 test rdb-save-incremental-fsync Undef for redis6 is expected not to contain File[/etc/redis.conf.puppet] with content =~ /^rdb-save-incremental-fsync/ Failure/Error: rdb_save_incremental_fsync: Undef, NameError: uninitialized constant Undef

Check failure on line 1710 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on rocky-8-x86_64 test rdb-save-incremental-fsync Undef for redis6 is expected not to contain File[/etc/redis.conf.puppet] with content =~ /^rdb-save-incremental-fsync/ Failure/Error: rdb_save_incremental_fsync: Undef, NameError: uninitialized constant Undef

Check failure on line 1710 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on debian-10-x86_64 test rdb-save-incremental-fsync Undef for redis6 is expected not to contain File[/etc/redis/redis.conf.puppet] with content =~ /^rdb-save-incremental-fsync/ Failure/Error: rdb_save_incremental_fsync: Undef, NameError: uninitialized constant Undef

Check failure on line 1710 in spec/classes/redis_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

redis on redhat-7-x86_64 test rdb-save-incremental-fsync Undef for redis6 is expected not to contain File[/etc/redis.conf.puppet] with content =~ /^rdb-save-incremental-fsync/ Failure/Error: rdb_save_incremental_fsync: Undef, NameError: uninitialized constant Undef
end

describe 'test systemd service timeouts' do
let(:params) do
{
Expand Down
5 changes: 3 additions & 2 deletions templates/redis.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -1030,8 +1030,9 @@ aof-rewrite-incremental-fsync <%= bool2str($aof_rewrite_incremental_fsync, 'yes'
# the file will be fsync-ed every 32 MB of data generated. This is useful
# in order to commit the file to the disk more incrementally and avoid
# big latency spikes.
<% if $rdb_save_incremental_fsync { -%>rdb-save-incremental-fsync <%= $rdb_save_incremental_fsync ? {true => 'yes', default => 'no'} %><% } -%>

<% unless $rdb_save_incremental_fsync =~ Undef{ -%>
rdb-save-incremental-fsync <%= bool2str($rdb_save_incremental_fsync, 'yes', 'no') -%>
<% } %>
# Redis Cluster Settings
<% if $cluster_enabled { -%>
cluster-enabled yes
Expand Down
Loading