-
Notifications
You must be signed in to change notification settings - Fork 723
YQ-4782 support checkpointing on streaming query restart #26696
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
base: main
Are you sure you want to change the base?
YQ-4782 support checkpointing on streaming query restart #26696
Conversation
🟢 |
⚪
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
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.
Pull Request Overview
This PR adds support for preserving checkpoints when streaming queries are manually restarted via ALTER STREAMING QUERY
. Previously, checkpoints were always lost when the query was restarted, but now the checkpoint state can be maintained across restarts.
Key changes include:
- Enhanced checkpoint management to support passing checkpoint IDs through query restarts
- Fixed checkpoint waiting logic for Stream Lookup Join (SLJ) operations
- Added comprehensive test coverage for checkpoint recovery scenarios
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
ydb/library/yql/providers/pq/task_meta/task_meta.h | Added new function declaration and namespace restructuring |
ydb/library/yql/providers/pq/task_meta/task_meta.cpp | Implemented new function to get topic partitions sets from DQ tasks |
ydb/library/yql/providers/generic/connector/libcpp/ut_helpers/connector_client_mock.h | Added reading lock/unlock functionality for testing |
ydb/library/yql/dq/tasks/dq_tasks_graph.h | Added comments explaining checkpoint injection logic |
ydb/library/yql/dq/state/dq_state_load_plan.cpp | Updated to handle multiple partition sets instead of single set |
ydb/library/yql/dq/actors/compute/dq_sync_compute_actor_base.h | Enhanced checkpoint readiness check to include sources and transforms |
ydb/library/yql/dq/actors/compute/dq_compute_actor_impl.h | Removed unnecessary parentheses in conditional |
ydb/library/yql/dq/actors/compute/dq_compute_actor_checkpoints.cpp | Added comments explaining checkpoint injection logic |
ydb/core/protos/kqp.proto | Added CheckpointId and QueryTextRevision fields to protobuf messages |
ydb/core/kqp/ut/federated_query/datastreams/datastreams_ut.cpp | Added comprehensive test cases for checkpoint recovery scenarios |
ydb/core/kqp/run_script_actor/ya.make | Added dependency for checkpointing events |
ydb/core/kqp/run_script_actor/kqp_run_script_actor.h | Added CheckpointId field to settings |
ydb/core/kqp/run_script_actor/kqp_run_script_actor.cpp | Implemented checkpoint handling logic in run script actor |
ydb/core/kqp/proxy_service/kqp_script_executions.h | Updated function signature for saving physical graph |
ydb/core/kqp/proxy_service/kqp_script_executions.cpp | Enhanced script execution with checkpoint and generation handling |
ydb/core/kqp/gateway/behaviour/streaming_query/ya.make | Added proxy service dependency |
ydb/core/kqp/gateway/behaviour/streaming_query/queries.cpp | Implemented checkpoint recovery logic for streaming queries |
ydb/core/kqp/gateway/behaviour/streaming_query/common/utils.h | Added QueryTextRevision field to streaming query settings |
ydb/core/kqp/gateway/behaviour/streaming_query/common/utils.cpp | Implemented parsing for QueryTextRevision |
ydb/core/kqp/executer_actor/kqp_data_executer.cpp | Enhanced checkpoint coordinator with proper state loading and checkpoint ID handling |
ydb/core/kqp/common/kqp_user_request_context.h | Added CheckpointId field to user request context |
ydb/core/kqp/common/kqp_user_request_context.cpp | Implemented CheckpointId serialization in user context |
ydb/core/kqp/common/events/script_executions.h | Updated event signatures to support generation tracking |
ydb/core/kqp/common/events/events.h | Added Generation and CheckpointId fields to script events |
ydb/core/fq/libs/checkpointing/checkpoint_coordinator.cpp | Added logging for checkpoint restoration process |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
⚪ |
Changelog entry
Support passing checkpoint on streaming query manual restart (before it checkpoint always was lost when called
ALTER STREAMING QUERY
)Changelog category
Description for reviewers