---
title: "Two Wang (@twowang59) | Hashnode"
description: "Web developer building small browser games and tools. Read the latest articles by Two Wang on Hashnode."
url: "https://hashnode.com/@twowang59"
---

@twowang59

# Two Wang

@twowang59 · Joined November 2026

Web developer building small browser games and tools

## Comments

[The apt lock problem is underrated: on Debian/Ubuntu images, unattended-upgrades can hold the lock right at first boot, which is exactly when cloud-init wants it. The part I like here is that you traced it to timing rather than just retrying — retries hide the root cause until it bites at 3am.](https://hashnode.com/posts/the-apt-lock-that-broke-our-auto-scaling/6b0c6ea6e49cccb18407639c/comment/6b0cbb895f33695c1084d948)

Comment · Article · 19h ago · [The apt Lock That Broke Our Auto Scaling](https://hashnode.com/posts/the-apt-lock-that-broke-our-auto-scaling/6b0c6ea6e49cccb18407639c)

[Solid write-up - the dual-write framing and the SKIP LOCKED relay are exactly right. Two things I would add for anyone taking this to production: Per-aggregate ordering is not automatic just because you set the Kafka partition key. With several relay workers and FOR UPDATE SKIP LOCKED, worker A can grab event #1 for an order while worker B grabs event #2 for the same order and publishes it first. Either serialize per aggregate in the relay (advisory lock on aggregate\_id) or attach a per-aggregate sequence number and have consumers reject stale ones. The outbox only fixes the producer side. If the broker loses the message after the relay marks the row as sent (non-durable topic, or a consumer that acks and then dies), the event is gone again. End-to-end still needs a durable log plus consumer-side dedupe on the outbox row id - the same unique-constraint table you describe - and a replay path that can republish from the outbox. Good call on the outbox-lag metric; it is the one signal that separates "quietly broken" from "working". A pg\_notify in the same transaction also cuts relay latency for free until you move to Debezium.](https://hashnode.com/posts/order-saved-email-never-sent-outbox-pattern/6b065c23e60a197e8bb9553a/comment/6b0667fa178187462ae57d7d)

Comment · Article · 5d ago · [Order Saved but the Email Never Went Out: The Outbox Pattern Explained](https://hashnode.com/posts/order-saved-email-never-sent-outbox-pattern/6b065c23e60a197e8bb9553a)

[The framing that helped me most: UnwindSafe is a lint about observing broken invariants, not about memory safety. Rust still guarantees no UB when a panic unwinds through your code, so the trait exists to stop catch\_unwind from handing you back a value that was mid-update when the invariant broke. Two practical consequences I keep running into: &mut T is deliberately not UnwindSafe. A panic halfway through a two-field invariant update leaves the struct memory-safe but not in the state your API promised, and the marker trait encodes exactly that. AssertUnwindSafe is usually right at the outer boundary of a fallible call (a plugin hook, a request handler) where the mutated state is discarded on panic anyway. It is usually wrong around a Vec you plan to keep using, because you are asserting the one thing you cannot prove. The runtime version of the same idea is poisoning: Mutex poison and the RefCell borrow flag both record that a panic may have left things half-done, and the safe default is to refuse further access rather than optimistically continue.](https://hashnode.com/posts/let-s-talk-about-unwind-safety/6b03f0209be40ec5796ba371/comment/6b047c4533a57a177ba17081)

Comment · Article · Nov 23 · 1 · [Let's talk about unwind safety!](https://hashnode.com/posts/let-s-talk-about-unwind-safety/6b03f0209be40ec5796ba371)

[The 40,000-line PR problem rings true. One thing that helped on a small team I was on: cap review size at the point of authoring rather than at review time - if a change touches more than ~400 lines, split it into a chain of stacked PRs each of which can stand on its own. It feels slower up front but reviewers actually leave meaningful comments instead of skimming.](https://hashnode.com/posts/are-your-code-reviews-starting-too-late/6b023484c7afb2e7b24f0e04/comment/6b02e2e78cc8ebd3fad81e03)

Comment · Article · Nov 22 · 1 · [Are your code reviews starting too late?](https://hashnode.com/posts/are-your-code-reviews-starting-too-late/6b023484c7afb2e7b24f0e04)
