[Pipe] Add an end-to-end full-FLUSH completion barrier and readiness metric#18280
Open
Caideyipi wants to merge 1 commit into
Open
[Pipe] Add an end-to-end full-FLUSH completion barrier and readiness metric#18280Caideyipi wants to merge 1 commit into
Caideyipi wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds an end-to-end full-FLUSH completion protocol for supported DataNode Pipe tasks and exposes its result through:
Although the result is exposed as a metric, the implementation spans the StorageEngine and the complete Pipe data path. The existing
pipe_datanode_remaining_event_count == 0does not cover data that is still held by a working TsFile processor, and a realtime source's TsFile/log mode describes only its extraction strategy rather than sink acknowledgement. Neither signal is therefore a safe completion oracle on its own.The new metric deliberately fails closed: transient false negatives are allowed, but unknown or changing state must never produce a false positive.
Operator contract
The metric reports
1only when all local DataRegion tasks of the Pipe have passed their latest successful full-FLUSH barriers through:and the existing remaining-event count is zero. Otherwise it reports
0.The intended test protocol is:
When Prometheus is used, callers must additionally verify that:
up == 1; andThe gauge values
0and1are represented exactly. Stale samples and missing targets, rather than floating-point precision, are the relevant risks.Design and review scope
1. Full-FLUSH boundary in the StorageEngine
2. Barrier publication and source assignment
PipeDataRegionAssignerserializes data publication and barrier publication and binds each barrier to an assigner epoch and data generation.3. Processing, sink acknowledgement, and ordered commit
4. Fail-closed readiness evaluation
0.Supported scope
The metric currently supports a running USER Pipe with:
iotdb-extractororiotdb-source;do-nothing-processor;Unsupported configurations report
0.The metric covers DataRegion/DML data-point completion only. It does not prove SchemaRegion/DDL completion. The existing remaining-event metric keeps its current meaning, and this metric is not added to the Grafana dashboards in this PR.
Key changed areas
StorageEngine,DataRegion, andTsFileProcessor: successful full-FLUSH boundary and ordinary-flush overlap handling.PipeDataRegionAssigner, realtime sources, and listeners: generation-bound invalidation and barrier publication.PipeHeartbeatEvent, processor collection, sink queue, and commit management: ordered barrier propagation through sink acknowledgement.PipeDataNodeCompletionOperatorandPipeDataNodeSinglePipeMetrics: fail-closed per-DataNode readiness calculation and lifecycle integration.Validation
This PR has: