Skip to content

Conversation

@v-pratap
Copy link
Contributor

@v-pratap v-pratap commented Sep 17, 2025

Setting writing_ = false in SetFlushed() is premature because the Flush-Query operation is not complete until OnQuery() finishes. This prematurely signals that no write is in progress, opening a window where StartWriting() can be called again before OnQuery() restarts or terminates the WriteLoop(), leading to concurrent write/flush operations.

To fix this, I am removing writing_ = false; from SetFlushed(). The writing_ flag will now only be updated by WriteLoop() based on whether there is more data to send, or when an error occurs. This ensures writing_ correctly reflects whether an operation is in flight.


This change is Reviewable

@v-pratap v-pratap requested review from a team as code owners September 17, 2025 08:36
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Sep 17, 2025
@codecov
Copy link

codecov bot commented Sep 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.03%. Comparing base (19f9509) to head (c7bd8ae).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15551      +/-   ##
==========================================
- Coverage   93.03%   93.03%   -0.01%     
==========================================
  Files        2408     2408              
  Lines      219826   219825       -1     
==========================================
- Hits       204526   204525       -1     
  Misses      15300    15300              

☔ 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.

@scotthart scotthart enabled auto-merge (squash) September 17, 2025 15:12
@scotthart scotthart merged commit c4bcce0 into googleapis:main Sep 17, 2025
66 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants