kekekiki
@adasdasd
Reviews Written
1
Average Rating
5.0
The introduction is empty
Posts
Q&A
์ฐ๋ ๋ ์นด์ดํธ๋ฅผ 100์ผ๋ก ์ค์ ํ๋๋ฐ newFixedThreadPool์ 32๋ก ์ง์ ํ ์ด์
๋ค ๊ฐ์ฌํฉ๋๋ค.
- 3
- 2
- 561
Q&A
synchronized ๋ฌธ์
@Transactional(isolation = Isolation.SERIALIZABLE) public void decrease(Long id, Long quantity) { Stock stock = stockRepository.findById(id).orElseThrow(); stock.decrease(quantity); stockRepository.saveAndFlush(stock); }์๋ ํ์ธ์. MySQL InnoDB์ default level์ repeatable_read๋ก ์๊ณ ์์ด์ ํ ๋จ๊ณ ๋ ๋์ ์์ค์ธ serializable๋ก ์ค์ ํ๋ฉด ๋์์ฑ ์ด์๋ฅผ ํด๊ฒฐํ ์ ์์๊ฑฐ๋ผ ์๊ฐ์ ํ์๋๋ฐ์. ๊ทธ๋๋ ๋์์ฑ ์ด์๊ฐ ๋ฐ์ํ๋๋ผ๊ตฌ์.. ์ ๊ฐ ๋ญ ๋์น๊ณ ์์๊น์?
- 0
- 4
- 475




