Skip to content

[Pipe] Avoid no-op ConfigNode consensus writes for covered progress - #18574

Open
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/skip-noop-pipe-progress-ratis-write
Open

[Pipe] Avoid no-op ConfigNode consensus writes for covered progress#18574
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/skip-noop-pipe-progress-ratis-write

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Motivation

A DataNode pipe heartbeat can report a composite progress index that is already fully covered by the ConfigNode progress. The previous isAfter() || equals() guard does not represent greater-than-or-equal semantics for partially ordered indexes such as RecoverProgressIndex. It can therefore merge to the same logical value, set the ConfigNode consensus-write flag, and periodically submit a no-op PipeHandleMetaChangeProcedure, producing unnecessary Ratis log entries.

Changes

  • Use ProgressIndex.isEqualOrAfter() to skip updates when ConfigNode already covers the DataNode progress.
  • Keep consensus writes when the DataNode heartbeat genuinely advances progress.
  • Log the coordinator progress captured before an actual update.
  • Add regression tests for both covered and advancing composite progress indexes.

Validation

  • mvn spotless:apply -pl iotdb-core/confignode
  • mvn -pl iotdb-core/confignode -Dtest=PipeHeartbeatParserTest -DfailIfNoTests=false test

This PR has:

  • been self-reviewed.
  • added unit tests to cover the new code paths.
Key changed classes
  • PipeHeartbeatParser
  • PipeHeartbeatParserTest

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant