From fb76c52d6548410cb9e42f8d03b380bd38e0b229 Mon Sep 17 00:00:00 2001 From: palage4a Date: Mon, 28 Jul 2025 12:16:38 +0300 Subject: [PATCH 1/3] doc: add the truncate() method changelog entry Follow-up for #78 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 482cbee..7456359 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added +- Method truncate() to clean tubes (#78). + ### Changed ### Fixed From 6673809aa8deebfb518ab4edd85317dcb476fedd Mon Sep 17 00:00:00 2001 From: palage4a Date: Mon, 28 Jul 2025 12:17:46 +0300 Subject: [PATCH 2/3] lint: add trailing new line Follow-up for #78 --- test/simple_test.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/simple_test.lua b/test/simple_test.lua index 5df2269..aef2376 100644 --- a/test/simple_test.lua +++ b/test/simple_test.lua @@ -293,4 +293,4 @@ function g.test_truncate() local stat = g.queue_conn:call('queue.statistics', { tube_name }) t.assert_equals(stat.calls.put, task_count) t.assert_equals(stat.calls.truncate, 2) -end \ No newline at end of file +end From c0bd390a09f5081a06aba876d6cbe021fe4135d1 Mon Sep 17 00:00:00 2001 From: palage4a Date: Mon, 28 Jul 2025 12:35:53 +0300 Subject: [PATCH 3/3] doc: add truncate method in metrics description Follow-up for #78 --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7501c28..f305038 100644 --- a/README.md +++ b/README.md @@ -204,7 +204,7 @@ installed and the feature is not disabled by the configuration. `{name = "tube_name", state = "request_type"}` A list of possible request types: `done`, `take`, `kick`, `bury`, `put`, - `delete`, `touch`, `ack`, `release`. The metric on the `sharded_queue.api` + `delete`, `touch`, `ack`, `release`, `truncate`. The metric on the `sharded_queue.api` role accumulates values from all buckets. * Metric `tnt_sharded_queue_router_statistics_tasks` is a gauge with @@ -224,7 +224,7 @@ installed and the feature is not disabled by the configuration. `{name = "tube_name", method = "api_call_method", status = "ok" or "error"}` A list of possible call methods: `put`, `take`, `delete`, `release`, `touch`, - `ack`, `bury`, `kick`, `peek`, `drop`. + `ack`, `bury`, `kick`, `peek`, `drop`, `truncate`. ### Storage (`roles.sharded-queue-storage` or `sharded_queue.storage` for the Cartridge) @@ -235,7 +235,7 @@ installed and the feature is not disabled by the configuration. `{name = "tube_name", state = "request_type"}` A list of possible request types: `done`, `take`, `kick`, `bury`, `put`, - `delete`, `touch`, `ack`, `release`. The metric on the `sharded_queue.storage` + `delete`, `touch`, `ack`, `release`, `truncate`. The metric on the `sharded_queue.storage` role shows actual values on the instance. * Metric `tnt_sharded_queue_storage_statistics_tasks` is a gauge with @@ -255,7 +255,7 @@ installed and the feature is not disabled by the configuration. `{name = "tube_name", method = "api_call_method", status = "ok" or "error"}` A list of possible call methods: `statistic`, `put`, `take`, `delete`, - `release`, `touch`, `ack`, `bury`, `kick`, `peek`, `drop`. + `release`, `touch`, `ack`, `bury`, `kick`, `peek`, `drop`, `truncate`. ## API extensions (compared to tarantool/queue)