Skip to content

Commit

Permalink
๐Ÿš‘ !HOTFIX: ์ฒด๊ฒฐ ๊ฐ€๋Šฅํ•œ ์ฃผ๋ฌธ ์กฐํšŒ ์‹œ write lock ์ถ”๊ฐ€
Browse files Browse the repository at this point in the history
- ์ฒด๊ฒฐ ๋™์‹œ์— ์—ฌ๋Ÿฌ๊ฐœ ๋˜๋Š” ๋ฌธ์ œ ํ•ด๊ฒฐ
  • Loading branch information
sieunie committed Nov 28, 2024
1 parent f37ecdf commit 4e640a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions BE/src/stockSocket/stock-execute-order.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ export class StockExecuteOrderRepository extends Repository<Order> {
status: StatusType.PENDING,
price: MoreThanOrEqual(value),
},
lock: {
mode: 'pessimistic_write',
},
});

const sellOrders = await queryRunner.manager.find(Order, {
Expand All @@ -48,6 +51,9 @@ export class StockExecuteOrderRepository extends Repository<Order> {
status: StatusType.PENDING,
price: LessThanOrEqual(value),
},
lock: {
mode: 'pessimistic_write',
},
});

await Promise.all(
Expand Down

0 comments on commit 4e640a9

Please sign in to comment.