Lewati ke konten
TikMonkey

Unduh MP4Pengunduh

Comment LOCK and I'll send you the cheat sheet comparing locks, atomic updates, and const… — @entrepreneurship93

Diposting 12 Okt 2026 (lebih dari dua minggu lalu)140 dtk1.052 tayangan

Lebih banyak dari @entrepreneurship93

Statistik video

Jumlah publik dari pembaruan terakhir.

Tayangan
1.052
Suka
16
Komentar
0
Dibagikan
2
Disimpan
5
Interaksi
1,71%
Durasi
140 dtk
Diposting
12 Okt 2026

Wawasan video

Video TikTok @entrepreneurship93 “Comment LOCK and I'll send you the cheat sheet comparing locks, atomic updates, and constraints. One ticket left. Two people click Buy at the same time. Both your screens say you got it. ⚡ The bug isn't in your checkout code, it's the gap between checking and writing. Your server reads the seat, sees available, and then, before it writes sold, does something else entirely ⚡ In that gap Leo's request runs the exact same read. It also sees available. Then both writes land, and you send two confirmation emails for one chair ⚡ This is a race condition: not a rare crash, but the ordinary outcome of two requests arriving at once. Nothing threw. Nothing warned. The database did exactly what it was asked, twice ⚡ The first fix is pessimistic locking. SELECT ... FOR UPDATE takes a row lock, and Leo's request can't even read that row until Maya's transaction commits. The queue behind it stops being optional ⚡ The second fix is better because it removes the gap entirely: fold the check into the write. UPDATE seats SET status='sold' WHERE seat='F12' AND status='available', one statement, one decision ⚡ That runs as a single atomic operation. The check and the update either both succeed or neither happens. There is no "between" left for a second request to stand in Even buggy code can't break that rule, because the constraint lives in the database, not in your code. A unique key on the event-and-seat pair means two confirmed tickets for the same seat can't physically exist in the table. The engine refuses the second insert no matter what your application does. The database never really picks a winner by magic. It forces the two requests into a line. One goes first. The other sees the result. Two rules that outlive this specific example: keep your checks inside the write, and keep the final guarantee in the schema. Which has cost you more time, the bug or the incident review after it? Comment LOCK for the full cheat sheet. #databases #concurrency #postgresql #backend #programming” memiliki 1.052 tayangan, 16 suka, 0 komentar, 2 kali dibagikan dalam metrik publik yang dicatat indeks ini. Itu setara tingkat interaksi sebesar 1,71% (suka, komentar, dan bagikan dibagi tayangan). Video ini diposting lebih dari dua minggu lalu dan berdurasi 2 menit, 20 detik. Video ini telah disimpan 5 kali.

Data per 26 Okt 2026 (UTC), dari pembaruan publik terakhir yang dicatat indeks ini.

Entrepreneur....

@entrepreneurship93

Lihat profil
Pengikut
11.564
Mengikuti
12
Suka
646.906
Video
41

Video Terbaru

VIDEO LAINNYA DARI @ENTREPRENEURSHIP93

Hashtag di video ini

Tautan tetap berada di dalam indeks ini.

Pertanyaan umum

Berapa tayangan video TikTok ini?
Data yang diindeks di sini mencatat 1.052 tayangan, 16 suka, dan 0 komentar.
Siapa yang memposting video TikTok ini?
Video ini diposting oleh @entrepreneurship93, yang ditautkan dari halaman ini.
Berapa tingkat interaksi video TikTok ini?
Dari metrik yang dicatat, tingkat interaksinya adalah 1,71% (suka + komentar + bagikan dibagi tayangan).
Kapan video TikTok ini diposting?
Video ini diposting pada 2026-10-12, lebih dari dua minggu lalu.
Hashtag apa saja yang dipakai di video ini?
Data yang dicatat menautkan 1 hashtag, dimulai dari #programming.
Berapa lama durasi video TikTok ini?
Klip yang dicatat berdurasi 2 menit, 20 detik.