Skip to content

fix(cfg): enable finalize-on-close for aiml-checkpointing profile - #5003

Open
vipnydav wants to merge 2 commits into
masterfrom
vipin-enable-finalize-on-close-for-checkpoint
Open

fix(cfg): enable finalize-on-close for aiml-checkpointing profile#5003
vipnydav wants to merge 2 commits into
masterfrom
vipin-enable-finalize-on-close-for-checkpoint

Conversation

@vipnydav

Copy link
Copy Markdown
Member

Description

This PR enables finalize-on-close by default for the aiml-checkpointing profile to prevent checkpoint loading failures caused by stale metadata.

Background:
As discovered in b/540250863 during checkpoint benchmarking, when a directory rename occurs, GCSFuse invalidates cached entries under the old folder prefix. A subsequent ListObjects call on the new directory re-populates the cache.

However, because zonal buckets use the appendable API where objects are not finalized on write by default, ListObjects can return a stale, intermediate object size for these unfinalized objects. Since the aiml-checkpointing profile sets an infinite metadata cache TTL (metadata-cache.ttl-secs = -1), this stale size is cached permanently in RAM, which ultimately causes OUT_OF_RANGE errors during checkpoint loading.

Enabling finalize on close explicitly finalizes the object, avoiding the asynchronous metadata propagation delay for unfinalized appendable objects.

Link to the issue in case of a bug fix.

b/544523257

Testing details

  1. Manual - NA
  2. Unit tests - Added test cases for aiml-checkpointing profile in cfg/config_test.go
  3. Integration tests - NA

Any backward incompatible change? If so, please explain.

NA

@vipnydav vipnydav added the execute-integration-tests Run only integration tests label Aug 10, 2026
@vipnydav
vipnydav requested a review from a team as a code owner August 10, 2026 03:22
@vipnydav vipnydav added the execute-integration-tests-on-zb To run E2E tests on zonal bucket. label Aug 10, 2026
@vipnydav
vipnydav requested a review from charith87 August 10, 2026 03:22
@github-actions github-actions Bot added the remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. label Aug 10, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the "aiml-checkpointing" profile optimization rule to the configuration. However, the changes in cfg/config.go and cfg/config_test.go were made manually. Since these files are auto-generated, they should not be edited directly; instead, you should modify cfg/params.yaml and run the generation command to regenerate them automatically.

Comment thread cfg/config.go
Comment thread cfg/config_test.go
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.82%. Comparing base (0673d19) to head (3b68fbe).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5003      +/-   ##
==========================================
+ Coverage   83.81%   83.82%   +0.01%     
==========================================
  Files         174      174              
  Lines       21376    21376              
==========================================
+ Hits        17916    17919       +3     
+ Misses       2779     2776       -3     
  Partials      681      681              
Flag Coverage Δ
unittests 83.82% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

Hi @charith87, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

3 similar comments
@github-actions

Copy link
Copy Markdown

Hi @charith87, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@github-actions

Copy link
Copy Markdown

Hi @charith87, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@github-actions

Copy link
Copy Markdown

Hi @charith87, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

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

Labels

execute-integration-tests Run only integration tests execute-integration-tests-on-zb To run E2E tests on zonal bucket. remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant