-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Pipe/IoTV2: Persist progress index locally before shutdown to accurate recovery after restart #15779
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
Conversation
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 local persistence of pipe progress indexes during shutdown to enable accurate recovery after restarts.
- Exposes and propagates
persistProgressIndex
from task to runtime level - Hooks into the shutdown sequence to trigger persistence via the task agent
- Implements
persistAllProgressIndexLocally
with locking and logging in the task agent
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
PipeTaskMeta.java | Changed persistProgressIndex visibility from private to public to allow external calls |
PipeRuntimeMeta.java | Added persistProgressIndex to iterate over all task metas and persist progress |
DataNodeShutdownHook.java | Calls persistAllProgressIndexLocally before shutting down the node |
PipeDataNodeTaskAgent.java | Introduced persistAllProgressIndexLocally with a read lock and informational logging |
Comments suppressed due to low confidence (5)
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeDataNodeTaskAgent.java:847
- [nitpick] Consider pluralizing 'progress index' to 'progress indexes' and rephrasing to 'Failed to persist progress indexes locally due to timeout.' for clarity.
LOGGER.info("Failed to persist all progress index locally because of timeout.");
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeDataNodeTaskAgent.java:854
- [nitpick] Rephrase to 'Successfully persisted progress indexes locally.' to match plural usage and improve readability.
LOGGER.info("Persist all progress index locally successfully.");
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/meta/PipeRuntimeMeta.java:143
- Add a JavaDoc comment explaining the purpose and thread-safety guarantees of this public method.
public void persistProgressIndex() {
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeDataNodeTaskAgent.java:845
- Provide JavaDoc for this shutdown method describing its behavior, locking semantics, and any exceptions it may throw.
public void persistAllProgressIndexLocally() {
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNodeShutdownHook.java:121
- Fix grammar in the comment: change 'to accurate recovery' to 'to ensure accurate recovery' for clarity.
// Persist progress index before shutdown to accurate recovery after restart
...b-core/datanode/src/main/java/org/apache/iotdb/db/pipe/agent/task/PipeDataNodeTaskAgent.java
Show resolved
Hide resolved
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #15779 +/- ##
============================================
- Coverage 39.12% 39.11% -0.01%
Complexity 198 198
============================================
Files 4837 4837
Lines 314486 314506 +20
Branches 39449 39452 +3
============================================
- Hits 123033 123021 -12
- Misses 191453 191485 +32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
...ode-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/meta/PipeRuntimeMeta.java
Show resolved
Hide resolved
…progress-when-shutdown
…e recovery after restart (apache#15779)
…e load conversion in parallel commit & Avoid lock acquisition in pipe task agent for too long & Used cached thread pool + caller runs policy for schema parallel task & Removed WAL usage for pipe and added insertNode mem-ctrl & Lengthened the start pipe reload interval & Enabled waiting to send + progressIndex persist at shutdown hook (#15826) * partial Update PipeDataNodeRuntimeAgent.java Update PipeTerminateEvent.java Update PipeTerminateEvent.java partially Update AbstractOperatePipeProcedureV2.java partial Update PipeTaskAgent.java Update DataNodeInternalRPCServiceImpl.java schema pool PR Revert report-interval * wal deletion * continue deletion * Update CheckpointManager.java * Release memory * Parital * update PipeInsertNodeTabletInsertionEvent * Remove useless * Update PipeRealtimeDataRegionHybridExtractor.java * Update Metric.java * setup * Fix * modify pipeStuckRestartMinIntervalMs * Pipe/IoTV2: Persist progress index locally before shutdown to accurate recovery after restart (#15779) * add MaxWaitFinishTime * update PipeConfig * Fix * Update WalDeleteOutdatedNewTest.java * Update PipeMemoryManager.java * Update CommonConfig.java --------- Co-authored-by: luoluoyuyu <zhenyu@apache.org> Co-authored-by: VGalaxies <vgalaxies@apache.org> Co-authored-by: Steve Yurong Su <rong@apache.org>
No description provided.