Skip to content

common/concurrent, db/snapshotsync: drop three review leftovers from #23812 - #23822

Merged
AskAlexSharov merged 1 commit into
mainfrom
lupin012/frozen_blocks_review_cuts
Sep 7, 2026
Merged

common/concurrent, db/snapshotsync: drop three review leftovers from #23812#23822
AskAlexSharov merged 1 commit into
mainfrom
lupin012/frozen_blocks_review_cuts

Conversation

@lupin012

@lupin012 lupin012 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Post-merge review cuts on the FrozenBlocks / CachedValue code merged in #23812. No behavior change, net -5 lines.

  • RemoteBlockReader.FrozenBlocksObserved waits with time.After instead of NewTimer plus a deferred Stop. Since go 1.23 an unreferenced timer is collected on its own, and the one-shot select form is what db/kv/kvcache/cache.go and db/kv/mdbx/kv_mdbx.go already use.
  • The publish docstring claimed that closing done before clearing running keeps a waiter from starting a pass of its own. Both writes happen under c.mu and claim takes the same mutex, so no caller can observe that order. The sentence is gone; the first one stays.
  • run returns bare: the named results are already assigned on the line above.

No test added, per the trivial-change carve-out in the TDD guidelines: cosmetic only, no new logic. Existing common/concurrent tests and make lint are green.

…23812

Post-merge review cuts on the FrozenBlocks/CachedValue code merged in #23812,
no behavior change.

- FrozenBlocksObserved waits with time.After instead of NewTimer plus a
  deferred Stop: since go 1.23 an unreferenced timer is collected on its own,
  and the one-shot select form is what kvcache and kv_mdbx already use.
- The publish docstring claimed that closing done before clearing running
  keeps a waiter from starting a pass of its own. Both writes happen under
  c.mu and claim takes the same mutex, so no caller can observe that order.
- run returns bare, the named results are already assigned on the line above.
@lupin012
lupin012 marked this pull request as ready for review September 6, 2026 13:27
@AskAlexSharov
AskAlexSharov added this pull request to the merge queue Sep 7, 2026
Merged via the queue into main with commit 78b1b1c Sep 7, 2026
149 of 175 checks passed
@AskAlexSharov
AskAlexSharov deleted the lupin012/frozen_blocks_review_cuts branch September 7, 2026 03:55
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.

2 participants