Skip to content

S3Queue: add SYSTEM DROP S3QUEUE FAILED FILES command - #121760

Closed
adityaksolves wants to merge 18 commits into
ClickHouse:masterfrom
adityaksolves:feature/s3queue-system-drop-failed-files
Closed

adityaksolves wants to merge 18 commits into
ClickHouse:masterfrom
adityaksolves:feature/s3queue-system-drop-failed-files

Conversation

@adityaksolves

@adityaksolves adityaksolves commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Related: #121752
Related: #113784

Changelog category

New Feature

Changelog entry

S3Queue: add SYSTEM DROP S3QUEUE FAILED FILES command to manually clean up terminal failed files from Keeper.

Detailed Description

Scope clarification - Phase 1, Split PR 2 of 2

This PR is the second of two independent PRs created by splitting the original Phase 1 work in #113784, following reviewer @kssenii's feedback to make the changes easier to review.

This PR depends on #121752 being merged first.

Both PRs are part of the original Phase 1 scope. The follow-up work discussed as Phase 2 in #113054, including pattern-based LIKE filtering and potential ordered-mode support, remains separate.

Implementation details

Adds the SYSTEM DROP S3QUEUE FAILED FILES [db.]table system query:

  • Adds parser and AST handling for DROP_S3QUEUE_FAILED_FILES in ASTSystemQuery.
  • Adds the interpreter execution path in InterpreterSystemQuery.
  • Adds the dropFailedFiles() interface in StorageObjectStorageQueue and its implementation in ObjectStorageQueueMetadata.
  • Triggers a ZooKeeper cleanup sweep for failed-file entries with a zero TTL to immediately clear eligible terminal failed entries.

Adds the failed_files_ttl_sec engine setting, which controls time-based
expiry of terminal failed files in unordered mode. tracked_files_limit's
description is also updated to document that it caps the failed-files
set by count in both ordered and unordered mode, independently of the
new setting.

For tables created before this setting existed, the value is inherited
from tracked_file_ttl_sec at attach time; this inheritance is a one-time
fallback and is not kept in sync with later changes to tracked_file_ttl_sec.
@clickhouse-gh clickhouse-gh Bot added comp-s3queue S3Queue/AzureQueue engines (queue-based ingestion from object storage). external Author is not a member of the ClickHouse organization labels Sep 23, 2026
…ystem-drop-failed-files

# Conflicts:
#	src/Interpreters/InterpreterSystemQuery.cpp
#	src/Interpreters/InterpreterSystemQuery.h
@adityaksolves

Copy link
Copy Markdown
Contributor Author

@kssenii Hi! This is Phase 2 of the original split (#113784).

Could you please approve the workflows here so the CI checks can start running? I know this depends on Phase 1 (#121752) being merged first, but just wanted to get the checks ready. Thanks!

@adityaksolves

Copy link
Copy Markdown
Contributor Author

Closing this PR as superseded by replacement PR #125392.

Both PRs represent Split 2 of Phase 1: adding the SYSTEM DROP S3QUEUE FAILED FILES command. The replacement PR retains this functionality and depends on PR #121752 (Split 1 of Phase 1), which remains open.

Please use #125392 for further review and testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-s3queue S3Queue/AzureQueue engines (queue-based ingestion from object storage). external Author is not a member of the ClickHouse organization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant