typescript
8 minTypeScript async iterators: connect pull-based demand to resource cleanup
Use for-await consumption, cancellation, and iterator return semantics without hiding queues.
Loading page...
typescript
8 minUse for-await consumption, cancellation, and iterator return semantics without hiding queues.
Q&A
Q&AAn old transaction snapshot may still need row versions that newer transactions have replaced.
PostgreSQL MVCC keeps row versions visible to active snapshots. A long-running transaction can hold an old snapshot open, so vacuum cannot yet remove some dead versions. Bound transaction lifetimes and investigate idle-in-transaction sessions when table bloat grows.
unix
9 minDiagnose ENOSPC when disk usage looks confusing, including exhausted inodes and deleted files still held open.
kubernetes
8 minFollow deletion timestamps and controller-owned finalizer removal without hiding leaked resources.
Q&A
Q&AA controller has not removed its finalizer after completing external cleanup.
The API server records deletion and retains the object while finalizers remain. The owning controller must retry idempotent cleanup and remove only its own finalizer after confirmed completion.
python
8 minUnderstand structured task lifetimes, cancellation, and grouped failures in asyncio.
Q&A
Q&ARelease owned resources in cleanup and normally propagate cancellation after cleanup.
Cancellation is delivered at an await point. Use finally blocks or async context managers to close resources, then re-raise CancelledError unless there is a deliberate reason to suppress it. A blocking synchronous call may not respond promptly, so keep the event loop cooperative and bound background work.
Q&A
Q&AIt cancels unfinished siblings, waits for cleanup, and surfaces failures as a group.
Child cancellation is cooperative, so cleanup must run and cancellation should normally be re-raised. A task group scopes lifetimes; it does not roll back remote effects or make partial success a business policy.