Programming Tips 101 - Don't mix transactional and non-transactional database calls

preview_player
Показать описание
In this video, I am discussing a serious bug that most junior software engineers cause in their code due to lack of knowledge about database serializability guarantees and how they work and how transactional and non-transactional calls work.

Check out our following articles:

#FAANG #Facebook #Google #Amazon #Apple #Microsoft #Uber #Netflix #Oracle #Lyft #SystemDesign #Interview #ComputerProgramming #ProgrammingTips101
Рекомендации по теме
Комментарии
Автор

Please let me know in the comments below if you find my video useful. And please do like the video if you find it helpful. Thanks

ThinkSoftware
Автор

The best approach here is to use unique index, even you pass the txn into the select query, but since the query return empty, no row can be locked, there still be race condition here. Another approach is using select...for update to trigger the gap lock, but this would cause bad performance, I think unique index is the best solution.

nidage
Автор

Hi!
This is a very interesting video.
I recommend creating a `Programming Tips 101` playlist on your channel, and post more videos like this.
Even though for senior engineers this is a obvious "don't" for a lot of there developers out there is not so obvious.

hqdevelopers
Автор

Like programming tips. Support! Subscribed!

yoyonevertheless
Автор

It was awesome video. Please keep on making such videos. Also if possible please share some useful links related to above issue so that as a follow up of your video, one can learn advanced concepts if he/she wants to.

reactnativeandexpo
Автор

Your programming tips videos are really helpful. I would like to see the tips and tricks for the mostly used objects or constructs.

iemranee
Автор

Many more awaited thanks for the nice explanation

ShivamKumar-xlzp
Автор

Very useful. Subscribe ur channel, plz make more like this, with playlist

ibrahimshaikh
Автор

Um.. bad code to push this logic in application layer to begin with.🤣 if someone submitted this PR… my first comment.. “ habibi.. da fukc is this?” Put a unique constraint in DB. Second, put a damn bloom filter to check for set membership somewhere upstream.

Your code in the end still has issues/bugs in concurrent scenarios. You are checking for absence of something and making a decision. There is nothing for you to attach locks or check versions in this scenario. Take this video down. This is trash.

Funsiestype