Repository navigation
Conversation
Retain accepted FCR leases until processing or discard and preserve heartbeats and ICRs across snapshot failures and lease waits. Use compact container IDs for safe-mode registration events, remove the test-only lease-count accessor, and add regression and integration coverage.
Mark deferred registration reports ready without generating a snapshot, and send one bounded follow-up heartbeat within the granting endpoint task. Cover re-registration readiness, lease denial, and blocked SCM peers; validate delivery with a heartbeat interval longer than the lease duration.
Use capacity-based lease grants, raise the default outstanding lease limit to 10, and cover startup safe-mode progress. Keep endpoint task scheduling changes in HDDS-15330-EXT.
Remove the SCM endpoint test's direct HDFS reference by using Mockito's default mock answer, and restore the missing SCMContext import in TestStorageContainerManager. Validated with 19 endpoint tests, SCM dependency analysis, full PMD including integration-test compilation, and repository-wide checkstyle.
Keep capability negotiation independent of finalization and activate leased reporting without re-registration. Preserve FCR/ICR ordering and retry readiness across finalization, with unit and integration coverage.
Preserve captured datanode version rejections before FCR deferral checks, including during concurrent SCM finalization. Shorten the test follower's election timeout without weakening removal shutdown assertions.
…ssion Emit the node registration event on successful registration while retaining container-based SafeMode checks after FCR processing. Clarify pending FCR and leased report naming, and remove the test-only dispatcher overload.
Prepare accepted leased and legacy reports in the protocol server and make them authoritative for dispatch. Keep unpublished-report cleanup local to the dispatcher, removing heartbeat cloning and payload dispatch flags.
Replace the processing lifecycle interface and unrestricted implementation with an optional LeaseClaim held directly by each FCR. Preserve idempotent completion and use real lease claims in tests. Rename the datanode removal handler to callback and document its locking contract.
Make grant, claim and processing states explicit while preserving capacity and expiry behavior. Show leased and unleased heartbeat paths directly, derive registration status from claims, and centralize documented SCM eligibility policy. Document registration generations, completion and SafeMode milestones, with regression coverage for re-registration and SCM modes.
Keep leases local to each SCM and preserve outstanding grants across leadership changes. Remove lease-term protocol and validation logic while retaining command terms, readiness checks, expiry, and capacity accounting. Verified with 270 focused tests, three FCR integration tests, and Checkstyle.
…isement Rely on apparent-version activation and ZDU registration fencing instead of a separate SCM capability flag. Preserve Recon reporting and pre-finalization fresh FCR generation and ICR handling. Verified with 324 focused tests, three FCR integration tests, and Checkstyle.
ivandika3
marked this pull request as ready for review
November 2, 2026 08:40
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.
What changes were proposed in this pull request?
This patch introduces the FCR lease mechanism similar to HDFS block report lease mechanism to bound the memory overhead of SCM due to concurrent full container reports. See https://issues.apache.org/jira/browse/HDDS-15330 for the background issues.
Overall flow
fullContainerReportDeferredset.ozone.scm.max.full.container.report.leasesis the maximum number of concurrent FCR that SCM allows at one time. It acts as the rate limitIf no lease is granted, the datanode retries on subsequent heartbeats. Other reports and commands continue normally.
Lease Lifecycle
The following is the lease lifecycleYou can refer to the
SCMFullContainerReportLeaseManager(state is inLeaseState).The main flow is as follow
However, there are also other transitions (e.g. lease expiry, replacement request, new registration, etc).
Notable properties
GRANTED,CLAIMED, andPROCESSINGall reserve capacityCLAIMEDwill be invoked before it's queued in the EventQueue to be processedGRANTEDexpires since once it goes toCLAIMEDandPROCESSING, the FCR has been received and should be completely handled by SCM (not waiting for datanode).SCM HA
The FCR lease is not replicated through Raft and the lease ID is not generated using the SCM HA sequence ID generator. This is because container report (FCR and ICR) processing is handled by both the SCM leader and followers. Therefore, we only need that the lease ID for each SCM node to be different.
Cross Cutting Concerns
ozone.scm.fullcontainer.report.rate.limit.enabledflag is introduced with default disabled. This would allow us to revertback to accepting all FCR report if for example it causes SCM to be in SafeMode longer than necessary.
ozone.scm.fullcontainer.report.rate.limit.enabledis reconfigurable per SCM node. This allows us to evaluate the FCR lease mechanism and disable it quickly if there are issues.HddsVersion.FULL_CONTAINER_REPORT_LEASEin the software version.Evaluations
There are tradeoffs on enabling the FCR lease mechanism
Advantages
ozone.scm.max.full.container.report.leasesDisadvantages
Generated-by: GPT 6.1 Sol
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15330
How was this patch tested?
UT, IT. (Clean CI: https://github.com/ivandika3/ozone/actions/runs/41396339409)