Skip to content

Fix potential race condition in restoring checkpoints.#1335

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_374851562
May 20, 2021
Merged

Fix potential race condition in restoring checkpoints.#1335
copybara-service[bot] merged 1 commit into
masterfrom
test_374851562

Conversation

@copybara-service
Copy link
Copy Markdown

Fix potential race condition in restoring checkpoints.
Before this cl, gfile.isdir(ckpt_dir) could return False, b/c ckpt_dir did not exist.
And if right after that ckpt_dir was created as directory, gfile.exists(ckpt_path) would return true and we'd try to read ckpt_dir as a checkpoint file, which would fail.

@google-cla google-cla Bot added the cla: yes label May 20, 2021
@copybara-service copybara-service Bot force-pushed the test_374851562 branch 5 times, most recently from e9e3fb3 to cc7092c Compare May 20, 2021 15:05
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 20, 2021

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.33%. Comparing base (e56340f) to head (572f518).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1335   +/-   ##
=======================================
  Coverage   82.33%   82.33%           
=======================================
  Files          65       65           
  Lines        5316     5316           
=======================================
  Hits         4377     4377           
  Misses        939      939           

☔ View full report in Codecov by Sentry.
📢 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.

Before this cl, gfile.isdir(ckpt_dir) could return False, b/c ckpt_dir did not exist.
And if right after that ckpt_dir was created as directory, gfile.exists(ckpt_path) would return true and we'd try to read ckpt_dir as a checkpoint file, which would fail.

PiperOrigin-RevId: 374874617
@copybara-service copybara-service Bot merged commit 572f518 into master May 20, 2021
@copybara-service copybara-service Bot deleted the test_374851562 branch May 20, 2021 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants