Skip to content

Commit 521af3b

Browse files
authored
Obsolete PQ setting queue.checkpoint.interval (elastic#17759)
`queue.checkpoint.interval` has never been implemented. This commit adds warning message when it is used and cleans up references.
1 parent d03f2ce commit 521af3b

File tree

14 files changed

+16
-30
lines changed

14 files changed

+16
-30
lines changed

config/logstash.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,6 @@
223223
#
224224
# queue.checkpoint.writes: 1024
225225
#
226-
# If using queue.type: persisted, the interval in milliseconds when a checkpoint is forced on the head page
227-
# Default is 1000, 0 for no periodic checkpoint.
228-
#
229-
# queue.checkpoint.interval: 1000
230226
#
231227
# ------------ Dead-Letter Queue Settings --------------
232228
# Flag to turn on dead-letter queue.

config/pipelines.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@
6868
# # Default is 1024, 0 for unlimited
6969
# queue.checkpoint.writes: 1024
7070
#
71-
# # If using queue.type: persisted, the interval in milliseconds when a checkpoint is forced on the head page
72-
# # Default is 1000, 0 for no periodic checkpoint.
73-
# queue.checkpoint.interval: 1000
74-
#
7571
# # Enable Dead Letter Queueing for this pipeline.
7672
# dead_letter_queue.enable: false
7773
#

docker/data/logstash/env2yaml/env2yaml.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ var validSettings = []string{
5757
"queue.max_bytes",
5858
"queue.checkpoint.acks",
5959
"queue.checkpoint.writes",
60-
"queue.checkpoint.interval",
60+
"queue.checkpoint.interval", // remove it for #17155
6161
"queue.drain",
6262
"dead_letter_queue.enable",
6363
"dead_letter_queue.max_bytes",

docs/reference/persistent-queues.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ If you want to define values for a specific pipeline, use [`pipelines.yml`](/ref
8282
To avoid losing data in the persistent queue, you can set `queue.checkpoint.writes: 1` to force a checkpoint after each event is written. Keep in mind that disk writes have a resource cost. Setting this value to `1` ensures maximum durability, but can severely impact performance. See [Controlling durability](#durability-persistent-queues) to better understand the trade-offs.
8383

8484

85-
`queue.checkpoint.interval`
86-
: Sets the interval in milliseconds when a checkpoint is forced on the head page. Default is `1000`. Set to `0` to eliminate periodic checkpoints.
87-
8885

8986
## Configuration notes [pq-config-notes]
9087

logstash-core/lib/logstash/environment.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ module Environment
8989
Setting::SettingNumeric.new("queue.max_events", 0), # 0 is unlimited
9090
Setting::SettingNumeric.new("queue.checkpoint.acks", 1024), # 0 is unlimited
9191
Setting::SettingNumeric.new("queue.checkpoint.writes", 1024), # 0 is unlimited
92-
Setting::SettingNumeric.new("queue.checkpoint.interval", 1000), # 0 is no time-based checkpointing
92+
Setting::SettingNumeric.new("queue.checkpoint.interval", 1000), # remove it for #17155
9393
Setting::Boolean.new("queue.checkpoint.retry", true),
9494
Setting::Boolean.new("dead_letter_queue.enable", false),
9595
Setting::Bytes.new("dead_letter_queue.max_bytes", "1024mb"),

logstash-core/lib/logstash/runner.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ def execute
270270
configure_pipeline_buffer_type
271271
end
272272

273+
deprecation_logger.deprecated "The setting `queue.checkpoint.interval` has no effect and will be removed from both " +
274+
"logstash.yml and pipeline.yml in a future release." if @settings.set?("queue.checkpoint.interval")
275+
273276
while (msg = LogStash::DeprecationMessage.instance.shift)
274277
deprecation_logger.deprecated msg
275278
end

logstash-core/lib/logstash/settings.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def self.included(base)
6666
"pipeline.ordered",
6767
"pipeline.ecs_compatibility",
6868
"queue.checkpoint.acks",
69-
"queue.checkpoint.interval",
69+
"queue.checkpoint.interval", # remove it for #17155
7070
"queue.checkpoint.writes",
7171
"queue.checkpoint.retry",
7272
"queue.drain",

logstash-core/spec/logstash/acked_queue_concurrent_stress_spec.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
let(:reject_memo_keys) { [:reject_memo_keys, :path, :queue, :writer_threads, :collector, :metric, :reader_threads, :output_strings] }
3030

3131
let(:queue) do
32-
described_class.new(path, page_capacity, 0, queue_checkpoint_acks, queue_checkpoint_writes, queue_checkpoint_interval, false, queue_capacity)
32+
described_class.new(path, page_capacity, 0, queue_checkpoint_acks, queue_checkpoint_writes, false, queue_capacity)
3333
end
3434

3535
let(:writer_threads) do
@@ -138,7 +138,6 @@ def publisher(items, writer)
138138
let(:queue_capacity_multiplier) { 128 }
139139
let(:queue_checkpoint_acks) { 1024 }
140140
let(:queue_checkpoint_writes) { 1024 }
141-
let(:queue_checkpoint_interval) { 1000 }
142141
let(:batch_size) { 500 }
143142
let(:batch_wait) { 1000 }
144143
let(:expected_count) { 60000 }
@@ -180,12 +179,12 @@ def publisher(items, writer)
180179
end
181180

182181
context "> larger checkpoint interval <" do
183-
let(:queue_checkpoint_interval) { 3000 }
182+
184183
it_behaves_like "a well behaved queue"
185184
end
186185

187186
context "> smaller checkpoint interval <" do
188-
let(:queue_checkpoint_interval) { 500 }
187+
189188
it_behaves_like "a well behaved queue"
190189
end
191190

@@ -256,12 +255,12 @@ def publisher(items, writer)
256255
end
257256

258257
context "> larger checkpoint interval <" do
259-
let(:queue_checkpoint_interval) { 3000 }
258+
260259
it_behaves_like "a well behaved queue"
261260
end
262261

263262
context "> smaller checkpoint interval <" do
264-
let(:queue_checkpoint_interval) { 500 }
263+
265264
it_behaves_like "a well behaved queue"
266265
end
267266

logstash-core/spec/logstash/instrument/wrapped_write_client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def threaded_read_client
125125

126126
context "WrappedAckedQueue" do
127127
let(:path) { Stud::Temporary.directory }
128-
let(:queue) { LogStash::WrappedAckedQueue.new(path, 1024, 10, 1024, 1024, 1024, false, 4096) }
128+
let(:queue) { LogStash::WrappedAckedQueue.new(path, 1024, 10, 1024, 1024, false, 4096) }
129129

130130
before do
131131
read_client.set_events_metric(metric.namespace([:stats, :events]))

logstash-core/spec/logstash/queue_factory_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
LogStash::Setting::SettingNumeric.new("queue.max_events", 0),
3030
LogStash::Setting::SettingNumeric.new("queue.checkpoint.acks", 1024),
3131
LogStash::Setting::SettingNumeric.new("queue.checkpoint.writes", 1024),
32-
LogStash::Setting::SettingNumeric.new("queue.checkpoint.interval", 1000),
3332
LogStash::Setting::Boolean.new("queue.checkpoint.retry", false),
3433
LogStash::Setting::SettingString.new("pipeline.id", pipeline_id),
3534
LogStash::Setting::PositiveInteger.new("pipeline.batch.size", 125),

0 commit comments

Comments
 (0)