SERIALIZABLE์ ์ฌ์ฉํ ๊ฒฝ์ฐ ๋ฐ๋๋ฝ์ด ๋ฐ์ํ๋ ์ด์ ๊ฐ ๋ญ๊น?
์๋๋ ์ ์ ์ฝ์ง ๊ณผ์ ์ด ์ ํ์ ธ์์ผ๋ ๊ฒฐ๋ก ์ด ๊ถ๊ธํ์ ๋ถ๋ค์ ์ ๋ชฉ์ฐจ์์ โ๊ฒฐ๋ก โ์ผ๋ก ๊ฐ์๋ฉด ๋ฉ๋๋ค.
๐์๋ฌธ์
์ฑ๋ฅ ํ ์คํธ๋ฅผ ์ํด Isolation Level Serializable์ ์ ์ฉํ๊ณ ์ฌ๊ณ 499๊ฐ ์ํ์์ 100๊ฐ์ ์ฐ๋ ๋๋ฅผ ์ฌ์ฉํ์ฌ ๋์ผํ 5๊ฐ ์ํ์ ๋ํ ์ด 500๊ฐ์ ์ฃผ๋ฌธ์ ์๋๋ฅผ ํด๋ณด๋ ค๊ณ ํ์ผ๋ ๋ฐ๋๋ฝ์ด ๋ฐ์ํ์๋ค.
๋๋ Serializable์ ๋จ์ ์ผ๋ก ๋ชจ๋ ๊ฑธ ์์ฐจ์ ์ผ๋ก ์คํํ๊ธฐ ๋๋ฌธ์ ์๋๊ฐ ๋๋ฆฌ๋ค๋ ๊ฒ ๋ง๊ณ ๋ ๋ชฐ๋์๋๋ฐ.. ์ด ํ ์คํธ๋ก Serializable ๊ฒฉ๋ฆฌ ์์ค์์ ๋ฐ๋๋ฝ์ด ๋ฐ์ํ ์ ์๋ค๋ ๊ฑธ ์ฒ์ ์์๋ค.
๋ด๊ฐ ์๊ฐํ serializable ๋ฐ๋๋ฝ ์๋๋ฆฌ์ค
์๋๊ฐ ์ผ๋ฐ์ ์ธ ๋ฐ๋๋ฝ์ด ๋ฐ์ํ๋ ์๋๋ฆฌ์ค๋ผ๋๋ฐ ์ ๋ฐ๋๋ฝ์ด ๋ฐ์ํ๋์ง ์ ํ ์ดํด๊ฐ ๋์ง ์์๋ค.
ํธ๋์ญ์ A | ํธ๋์ญ์ B | |
---|---|---|
1 | select ~ where id = 1 for share; | |
2 | select ~ where id = 1 for share; | |
3 | update ~ where id = 1 | |
4 | update ~ where id = 1; | |
5 | DEAD LOCK | DEAD LOCK |
6 | ROLL BACK | |
7 | ๋ฐฐํ ๋ฝ ํ๋ ํ ์ ๋ฐ์ดํธ ์ฟผ๋ฆฌ ์คํ | |
8 | COMMIT [ ๋ฐฐํ๋ฝ ๋ฐํ ] |
๋๋ ํธ๋์ญ์ B๊ฐ 2๋ฒ์์ ์กฐํ๊ฐ ๋๋๊ณ S-Lock์ ๋ฐ๋ฉํ๋ฉด, ํธ๋์ญ์ A๊ฐ X-Lock์ ์ป์ด์ update๋ฅผ ์ํํ ์ ์์ ์ค ์์๋ค. ๊ทธ๋ฐ๋ฐ ์ ๋ฐ๋๋ฝ์ด ๋ฐ์ํ๋ ๊ฑด์ง๊ฐ ์๋ฌธ์ด์๋ค.
๊ทธ๋ฆฌ๊ณ S-Lock(๊ณต์ ๋ฝ)์ ๋ณด์ ํ ํธ๋์ญ์ ์ด ๋ฐ์ดํฐ๋ฅผ ๋ณ๊ฒฝํ๊ธฐ ์ํด X-Lock(๋ฐฐํ ๋ฝ)์ผ๋ก ์ ํํ๋ ค๋ฉด, ๊ธฐ์กด์ ๋ชจ๋ S-Lock์ด ํด์ ๋ ์ํ์ฌ์ผ ํ๋ค๊ณ ์๊ณ ์๋ค. ๋๋ S-Lock์ด ํธ๋์ญ์ ์ด ์ข ๋ฃ๋์ง ์์๋ ์กฐํ๊ฐ ๋๋๋ฉด Lock์ด ์๋์ผ๋ก ๋ฐํ๋๋ค๊ณ ์๊ฐํ๊ธฐ ๋๋ฌธ์(์๋ชป๋ ์ง์ ใ ใ ,,,,), ํธ๋์ญ์ B์ 2๋ฒ ์กฐํ ์๋ฃ ํ S-Lock์ด ํด์ ๋๊ณ , ์ดํ ํธ๋์ญ์ A๊ฐ X-Lock์ ํ๋ํ์ฌ ์ ๋ฐ์ดํธ๋ฅผ ์ํํ๊ฒ ์งํํ ๊ฒ์ผ๋ก ์์ํ๋ค.
๋ฐ๋๋ฝ MySQL ๋ก๊ทธ
===================================== 2024-02-04 10:56:13 0x179f3b000 INNODB MONITOR OUTPUT ===================================== Per second averages calculated from the last 4 seconds ----------------- BACKGROUND THREAD ----------------- srv_master_thread loops: 380 srv_active, 0 srv_shutdown, 213480 srv_idle srv_master_thread log flush and writes: 0 ---------- SEMAPHORES ---------- OS WAIT ARRAY INFO: reservation count 7025 OS WAIT ARRAY INFO: signal count 6733 RW-shared spins 0, rounds 0, OS waits 0 RW-excl spins 0, rounds 0, OS waits 0 RW-sx spins 0, rounds 0, OS waits 0 Spin rounds per wait: 0.00 RW-shared, 0.00 RW-excl, 0.00 RW-sx ------------------------ LATEST DETECTED DEADLOCK ------------------------ 2024-02-04 10:56:11 0x178a5f000 *** (1) TRANSACTION: TRANSACTION 801177, ACTIVE 0 sec starting index read mysql tables in use 1, locked 1 LOCK WAIT 4 lock struct(s), heap size 1128, 2 row lock(s) MySQL thread id 13761, OS thread handle 6338752512, query id 556491 localhost 127.0.0.1 root updating UPDATE prod_opt SET INV_QTY = INV_QTY - 1 WHERE OPT_COMB_NO = 1 *** (1) HOLDS THE LOCK(S): RECORD LOCKS space id 214 page no 9 n bits 408 index PRIMARY of table `syusyu`.`prod_opt` trx id 801177 lock mode S locks rec but not gap Record lock, heap no 2 PHYSICAL RECORD: n_fields 13; compact format; info bits 0 0: len 4; hex 80000001; asc ;; 1: len 6; hex 0000000c3997; asc 9 ;; 2: len 7; hex 02000001a02cbc; asc , ;; 3: len 4; hex 80002711; asc ' ;; 4: len 4; hex 80000000; asc ;; 5: len 4; hex 8000000a; asc ;; 6: len 4; hex 649d3e1a; asc d > ;; 7: len 4; hex 80013880; asc 8 ;; 8: SQL NULL; 9: SQL NULL; 10: SQL NULL; 11: SQL NULL; 12: len 1; hex 4e; asc N;; *** (1) WAITING FOR THIS LOCK TO BE GRANTED: RECORD LOCKS space id 214 page no 9 n bits 408 index PRIMARY of table `syusyu`.`prod_opt` trx id 801177 lock_mode X locks rec but not gap waiting Record lock, heap no 2 PHYSICAL RECORD: n_fields 13; compact format; info bits 0 0: len 4; hex 80000001; asc ;; 1: len 6; hex 0000000c3997; asc 9 ;; 2: len 7; hex 02000001a02cbc; asc , ;; 3: len 4; hex 80002711; asc ' ;; 4: len 4; hex 80000000; asc ;; 5: len 4; hex 8000000a; asc ;; 6: len 4; hex 649d3e1a; asc d > ;; 7: len 4; hex 80013880; asc 8 ;; 8: SQL NULL; 9: SQL NULL; 10: SQL NULL; 11: SQL NULL; 12: len 1; hex 4e; asc N;; *** (2) TRANSACTION: TRANSACTION 801178, ACTIVE 0 sec starting index read mysql tables in use 1, locked 1 LOCK WAIT 4 lock struct(s), heap size 1128, 2 row lock(s) MySQL thread id 13762, OS thread handle 6344323072, query id 556490 localhost 127.0.0.1 root updating UPDATE prod_opt SET INV_QTY = INV_QTY - 1 WHERE OPT_COMB_NO = 1 *** (2) HOLDS THE LOCK(S): RECORD LOCKS space id 214 page no 9 n bits 408 index PRIMARY of table `syusyu`.`prod_opt` trx id 801178 lock mode S locks rec but not gap Record lock, heap no 2 PHYSICAL RECORD: n_fields 13; compact format; info bits 0 0: len 4; hex 80000001; asc ;; 1: len 6; hex 0000000c3997; asc 9 ;; 2: len 7; hex 02000001a02cbc; asc , ;; 3: len 4; hex 80002711; asc ' ;; 4: len 4; hex 80000000; asc ;; 5: len 4; hex 8000000a; asc ;; 6: len 4; hex 649d3e1a; asc d > ;; 7: len 4; hex 80013880; asc 8 ;; 8: SQL NULL; 9: SQL NULL; 10: SQL NULL; 11: SQL NULL; 12: len 1; hex 4e; asc N;; *** (2) WAITING FOR THIS LOCK TO BE GRANTED: RECORD LOCKS space id 214 page no 9 n bits 408 index PRIMARY of table `syusyu`.`prod_opt` trx id 801178 lock_mode X locks rec but not gap waiting Record lock, heap no 2 PHYSICAL RECORD: n_fields 13; compact format; info bits 0 0: len 4; hex 80000001; asc ;; 1: len 6; hex 0000000c3997; asc 9 ;; 2: len 7; hex 02000001a02cbc; asc , ;; 3: len 4; hex 80002711; asc ' ;; 4: len 4; hex 80000000; asc ;; 5: len 4; hex 8000000a; asc ;; 6: len 4; hex 649d3e1a; asc d > ;; 7: len 4; hex 80013880; asc 8 ;; 8: SQL NULL; 9: SQL NULL; 10: SQL NULL; 11: SQL NULL; 12: len 1; hex 4e; asc N;; *** WE ROLL BACK TRANSACTION (2) ------------ TRANSACTIONS ------------ Trx id counter 801188 Purge done for trx's n:o < 801188 undo n:o < 0 state: running but idle History list length 12 LIST OF TRANSACTIONS FOR EACH SESSION: ---TRANSACTION 281480386120832, not started 0 lock struct(s), heap size 1128, 0 row lock(s) ---TRANSACTION 281480386120040, not started 0 lock struct(s), heap size 1128, 0 row lock(s) ---TRANSACTION 281480386119248, not started 0 lock struct(s), heap size 1128, 0 row lock(s) -------- FILE I/O -------- I/O thread 0 state: waiting for i/o request ((null)) I/O thread 1 state: waiting for i/o request (insert buffer thread) I/O thread 2 state: waiting for i/o request (read thread) I/O thread 3 state: waiting for i/o request (read thread) I/O thread 4 state: waiting for i/o request (read thread) I/O thread 5 state: waiting for i/o request (read thread) I/O thread 6 state: waiting for i/o request (write thread) I/O thread 7 state: waiting for i/o request (write thread) I/O thread 8 state: waiting for i/o request (write thread) Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] , ibuf aio reads: Pending flushes (fsync) log: 0; buffer pool: 0 1181 OS file reads, 137311 OS file writes, 89120 OS fsyncs 0.00 reads/s, 0 avg bytes/read, 20.93 writes/s, 15.42 fsyncs/s ------------------------------------- INSERT BUFFER AND ADAPTIVE HASH INDEX ------------------------------------- Ibuf: size 1, free list len 0, seg size 2, 0 merges merged operations: insert 0, delete mark 0, delete 0 discarded operations: insert 0, delete mark 0, delete 0 Hash table size 34679, node heap has 2 buffer(s) Hash table size 34679, node heap has 1 buffer(s) Hash table size 34679, node heap has 1 buffer(s) Hash table size 34679, node heap has 4 buffer(s) Hash table size 34679, node heap has 2 buffer(s) Hash table size 34679, node heap has 2 buffer(s) Hash table size 34679, node heap has 1 buffer(s) Hash table size 34679, node heap has 1 buffer(s) 38.24 hash searches/s, 11.50 non-hash searches/s --- LOG --- Log sequence number 907910858 Log buffer assigned up to 907910858 Log buffer completed up to 907910858 Log written up to 907910858 Log flushed up to 907910858 Added dirty pages up to 907910858 Pages flushed up to 907899930 Last checkpoint at 907899930 Log minimum file id is 268 Log maximum file id is 277 98399 log i/o's done, 12.25 log i/o's/second ---------------------- BUFFER POOL AND MEMORY ---------------------- Total large memory allocated 0 Dictionary memory allocated 851227 Buffer pool size 8191 Free buffers 6027 Database pages 2150 Old database pages 773 Modified db pages 21 Pending reads 0 Pending writes: LRU 0, flush list 0, single page 0 Pages made young 2, not young 0 0.00 youngs/s, 0.00 non-youngs/s Pages read 1133, created 1017, written 30485 0.00 reads/s, 0.22 creates/s, 7.93 writes/s Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000 Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s LRU len: 2150, unzip_LRU len: 0 I/O sum[0]:cur[0], unzip sum[0]:cur[0] -------------- ROW OPERATIONS -------------- 0 queries inside InnoDB, 0 queries in queue 0 read views open inside InnoDB Process ID=2301, Main thread ID=0x178c8f000 , state=sleeping Number of rows inserted 81505, updated 13637, deleted 0, read 122549 7.50 inserts/s, 1.50 updates/s, 0.00 deletes/s, 12.00 reads/s Number of system rows inserted 39, updated 374, deleted 16, read 68564 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s ---------------------------- END OF INNODB MONITOR OUTPUT ============================
โ ์์ธ ์ถ๋ก & ํด๊ฒฐ์ฑ ์๋
- ๋ฐ๋๋ฝ์ด ๋์ฒด ์ ๋ฐ์ํ๋ ๊ฑด์ง ์๊ณ ์ถ์ด์ ๋ก๊ทธ๋ฅผ ์ดํด๋ณด์๋ค. ํ์ง๋ง ๋ก๊ทธ๋ฅผ ๋ด๋ ์ดํด๊ฐ ๋ ๋ฆฌ๊ฐ ์์๋ค.. ์๋..? ์ ์ด์ ๋ฝ ๊ฐ๋
์ ์๋ชป ์๊ณ ์์์ผ๋๊น..
- ํธ๋์ญ์
๊ฐ์ lock ๋ฐํ ๋ฐ ํ๋ ๊ณผ์ ์ ๋ํ ์๋ชป ์๊ณ ์์๋ ๊ฒ ์์ธ์ด์๋ค.
์๊ณ ๋ณด๋.. ๋๋ ์กฐํ๋ฅผ ํ ๋ S-Lock์ ๊ฑธ์์ผ๋ฉด ํธ๋์ญ์ ์ด ์ข ๋ฃ๋์ง ์์๋ ๊ทธ ๋ฌธ์ฅ์ ์คํ์ด ๋๋๋ฉด ๋ฝ์ด ๋ฐํ๋๋ ์ค ์์๋ค. ํ์ง๋ง S-Lock์ด์ด๋ ๊ทธ Lock์ ํธ๋์ญ์ ๋จ์๋ก ๊ด๋ฆฌ๋๊ณ , ํธ๋์ญ์ ์ด ์ข ๋ฃ๋์ด์ผ Lock์ด ๋ฐํ๋๋ค๊ณ ํ๋ค.
๐กS-Lock์ด๋ X-Lock์ ํ๋ ์ ํธ๋์ญ์ ์ด ์ปค๋ฐ๋๊ฑฐ๋ ๋กค๋ฐฑ๋ ๋๊น์ง ์ ์ง๋๋ค.
โ ํธ๋์ญ์ ๋จ์๋ก ๋ฝ์ด ๊ด๋ฆฌ๋จ.
โ๊ฒฐ๋ก (Serializable์์ ๋ฐ๋๋ฝ์ด ๋ฐ์ํ๋ ์ด์ )
๊ต์ฐฉ์ํ(Deadlock, ๋ฐ๋๋ฝ)์ด๋?
๋ฐ๋๋ฝ์ ๋ ์ธ์ ์ด ์๋ก ์ ๊ทผํ๋ ค๋ ๋ฆฌ์์ค์ ๋ํด ์ ๊ธ์ ์ค์ ํ๊ณ , ์์ธก ๋ชจ๋ ์๋๋ฐฉ์ ์ ๊ธ์ด ํด์ ๋ ๋๊น์ง ์งํ์ ๋ฉ์ถ ์ํ๋ฅผ ์๋ฏธํ๋ค. ์ด ์ํฉ์ ์ด๋ ํ ์ชฝ์ด ๋ฌผ๋ฌ๋์ง ์๋ ์ด์ ํด๊ฒฐ๋ ์ ์์ผ๋ฉฐ, ์ข์ ๊ณจ๋ชฉ์์ ๋ง์ฃผ์น ๋ ๋์ ์ฐจ๋์ด ์๋ก ์ง๋๊ฐ ์ ์๋ ์ํ์ ๋น์ ํ ์ ์๋ค.
๋ฐ์ดํฐ๋ฒ ์ด์ค์์ ๊ต์ฐฉ์ํ๊ฐ ๋ฐ์ํ๋ฉด, ์ด๋ฅผ ๋จผ์ ์ธ์งํ ์ธ์ ์ ๋ฌธ์ ๋ฅผ ์ผ์ผํจ ํน์ ๋ช ๋ น๋ฌธ์ ๋ํด ๋กค๋ฐฑ์ ์ํํ๊ณ ์๋ฌ ๋ฉ์์ง๋ฅผ ๋ฐ์์ํจ๋ค. ํ ์ธ์ ์ ์ ๊ธ์ด ํด์ ๋๋ฉด, ์ด๋ก ์ธํด ๋๋จธ์ง ์ธ์ ๋ ์ํํ๊ฒ ์งํ๋ ์ ์๊ฒ ๋์ด ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋๋ค.
S-Lock๊ณผ X-Lock
- ๊ณต์ ๋ฝ(Shared Lock / ์ฝ๊ธฐ ๋ฝ / S-Lock)
- ์ฌ๋ฌ ํธ๋์ญ์ ์ด ๋์์ ๋ฐ์ดํฐ๋ฅผ ์ฝ์ ์ ์๋๋ก ํ์ฉํ๋ ๋ฝ
- ํธ๋์ญ์ ์ด ๊ฐ์ฒด๋ฅผ ์ฝ๊ธฐ ์ํ๋ค๋ฉด ๋จผ์ ๋ ์ ๋ชจ๋๋ก ์ ๊ธ์ ํ๋ํด์ผ ํ๋ค. ๋์์ ์ฌ๋ฌ ํธ๋์ญ์ ์ด ๊ณต์ ๋ชจ๋๋ก ์ ๊ธ์ ํ๋ํ๋ ๊ฒ์ ํ์ฉ๋์ง๋ง ๋ง์ฝ ๊ทธ ๊ฐ์ฒด์ ์ด๋ฏธ ๋ ์ ๋ชจ๋๋ก ์ ๊ธ์ ํ๋ํ ํธ๋์ญ์ ์ด ์์ผ๋ฉด ์ด ํธ๋์ญ์ ์ด ์๋ฃ๋ ๋๊น์ง ๊ธฐ๋ค๋ ค์ผ ํ๋ค.
- ๋ฐฐํ๋ฝ(Exclusive Lock / ์ฐ๊ธฐ ๋ฝ / X-Lock)
- ๋ฐฐํ๋ฝ์ ๋ฐ์ดํฐ๋ฅผ ์์ ํ ๋ ์ฌ์ฉ๋๋ ๋ฝ์ผ๋ก, ํ ๋ฒ์ ํ๋์ ํธ๋์ญ์ ๋ง ๋ฐ์ดํฐ์ ์ ๊ทผํ ์ ์๊ฒ ํ๋ค.
- ํธ๋์ญ์ ์ด ๊ฐ์ฒด์ ์ฐ๊ธฐ๋ฅผ ์ํ๋ค๋ฉด ๋จผ์ ๋ ์ ๋ชจ๋๋ก ์ ๊ธ์ ํ๋ํด์ผ ํ๋ค. ๋ค๋ฅธ ์ด๋ค ํธ๋์ญ์ ๋ ๋์์ ์ ๊ธ์ ํ๋ํ ์ ์์ผ๋ฏ๋ก(๊ณต์ ๋ชจ๋๋ ์ง ๋ ์ ๋ชจ๋๋ ์ง) ๊ทธ ๊ฐ์ฒด์ ์ ๊ธ์ด ์กด์ฌํ๋ค๋ฉด ํธ๋์ญ์ ์ ๋๊ธฐํด์ผ ํ๋ค.
Serializable ๊ฒฉ๋ฆฌ ์์ค์์์ ๋ฐ๋๋ฝ ๋ฐ์ ์๋๋ฆฌ์ค
ํธ๋์ญ์ A | ํธ๋์ญ์ B | ์ค๋ช | |
---|---|---|---|
1 | select ~ where id = 1 for share; | ํธ๋์ญ์ A๊ฐ id = 1 row์ ๋ํ S-Lock ํ๋ | |
2 | select ~ where id = 1 for share; | ํธ๋์ญ์ B๊ฐ id = 1 row์ ๋ํ S-Lock ํ๋ | |
3 | update ~ where id = 1 | ํธ๋์ญ์ A๊ฐ ์ ๋ฐ์ดํธ๋ฅผ ์ํด X-Lock์ ์์ฒญํ์ง๋ง, ํธ๋์ญ์ B๊ฐ S-Lock์ ๋ณด์ ์ค์ด๊ธฐ ๋๋ฌธ์ ๋ฝ์ ๋ฐํํ ๋๊น์ง ๊ธฐ๋ค๋ฆฐ๋ค. | |
4 | update ~ where id = 1; | ํธ๋์ญ์ B๋ ์ ๋ฐ์ดํธ๋ฅผ ์ํด X-Lock์ ์์ฒญํ์ง๋ง, ํธ๋์ญ์ A๊ฐ S-Lock์ ๋ณด์ ์ค์ด๊ธฐ ๋๋ฌธ์ ๋ฝ์ ๋ฐํํ ๋๊น์ง ๊ธฐ๋ค๋ฆฐ๋ค. | |
5 | DEAD LOCK | DEAD LOCK | ์ด์ ๋ ํธ๋์ญ์ ๋ชจ๋ ์๋ก S-Lock์ ๋ฐํํ ๋๊น์ง ๊ณ์ ๋๊ธฐํ๊ฒ๋๋ค โ ๋ฐ๋๋ฝ |
6 | ROLL BACK | DBMS๊ฐ ๋ฐ๋๋ฝ์ ๊ฐ์งํ๊ณ ํด๊ฒฐํ๊ธฐ ์ํด ํธ๋์ญ์ B๋ฅผ ๊ฐ์ ๋ก ๋กค๋ฐฑ์ํจ๋ค. ์ด๋ S-Lock์ด ๋ฐํ๋๋ค. | |
7 | [ acquires a exclusive lock โ execute update query ] | ํธ๋์ญ์ B๊ฐ ๋กค๋ฐฑ๋์ด X-Lock์ ์ป์ ์ ์๊ฒ ๋์๋ค. ํธ๋์ญ์ A๋ ๋ฝ์ ์ป์ด ์ ๋ฐ์ดํธ๋ฅผ ์ํํ๋ค. | |
8 | COMMIT [ release exclusive lock ] | ์์
์ด ์๋ฃ๋๊ณ ์ปค๋ฐํ๋ค. ํธ๋์ญ์ A๊ฐ ๋ณด์ ํ๊ณ ์๋ X-Lock์ด ํด์ ๋๋ค. |
๐ ๋๊ฐ๋ฉฐ
์ง์ ํ ์คํธ๋ฅผ ํตํด Serializable ๊ฒฉ๋ฆฌ ์์ค์ด ์ ๋์์ฑ ์ธก๋ฉด์์ ์ต์ ์ธ์ง ๋ฐ๋ก ์ ์ ์์๋ค. ๋ฐ๋๋ฝ์ด ๋ฐ์ํ๊ณ ํธ๋์ญ์ ์ด ๊ณ์ ๋กค๋ฐฑ๋๊ธฐ ๋๋ฌธ์, ์ด ๊ฒฉ๋ฆฌ ์์ค์์๋ ํ ๋ฒ์ ํ๋์ ์์ ๋ง ์ฒ๋ฆฌํ ์ ์๊ณ ๋ณ๋ ฌ ์ฒ๋ฆฌ๊ฐ ๋ถ๊ฐ๋ฅํ๋ค๋ ๊ฑธ ์ง์ ๊ฒฝํํ ์ ์์๋ค.
๋ฐ๋๋ฝ์ ๋ํ ์ฌ์ ์ ์๋ ์๊ณ ์์์ง๋ง, ์ค์ ๋ก ๋๊ตฐ๊ฐ์๊ฒ ์ด ๊ฐ๋ ์ ์ค๋ช ํด์ผ ํ ๋ ๋ช ํํ๊ฒ ์ค๋ช ํ์ง ๋ชปํ์๋ค. ์ค์ ๋ก ๊ฒช์ด๋ณธ์ ๋ ์๊ณ ์ด๋ก ์ผ๋ก๋ง ๋์ถฉ ์๊ณ ์์์ผ๋ ๋น์ฐํ๋ค ์ด๋ฒ ๊ฒฝํ์ ํตํด ์ญ์ ์ง์ ๊ฒช์ด๋ณด๋ ๊ฒ ์ด๋ก ์ ์ผ๋ก๋ง ๋ฐฐ์ด ์ง์์ ์ดํด๋๊ฐ ๊น์ด์ง๊ณ , ๊ธฐ์ต์๋ ๋ ์ค๋ ๋จ๋๋ค๋ ๊ฒ์ ์์ผ ๋ ๊นจ๋ฌ์๋ค.
์ ๋ง์ ์ ๋ฐฐ ๊ฐ๋ฐ์๋ค์ด ์๋ฌ๋ฅผ ๋ง์ด ๋ด๋ณด๋ผ๊ณ ํ๋ ์กฐ์ธ์ ๋ง์ด ํด์ฃผ์๋์ง ์ด๋ฒ ๊ฒฝํ์ ํตํด ๋ผ์ ๋ฆฌ๊ฒ ๋๊ผ๋ค. ์๋ฌ๋ฅผ ๋ง์ด ๋ด๋ณธ ์ฌ๋์ด ์ ํญ๋ฐ์ ์ธ ์ฑ์ฅ์ํ๋์ง๋ ์ ๊ฒ ๊ฐ๋ค. ์ด์ ์ ๋๋ ์ค๋ฅ๋ฅผ ํผํ๋ ค๊ณ ๋ง ํ๊ณ , ๋น ๋ฅธ ํด๊ฒฐ ํ๋ ค๊ณ ํจ์จ์ฑ๋ง์ ์ถ๊ตฌํ์๋ค. ๋๋ฃ๋ค์ด ๊ฒช๋ ๊ธฐ์์ฒ์ธํ ์ค๋ฅ๋ค์ ๋ณด๋ฉฐ ์ด๋ป๊ฒํ๋ฉด ์ ๋ฐ ์๋ฌ๊ฐ ๋ ์ ์๋๊ฑฐ์ง..? ์ถ์ ์ํฉ์ด ๋ง์์๋ค ใ ใ ใ ์๋ฌ๋ฅผ ๋ง์ฃผํ๊ณ , ๊ทธ ๋ฌธ์ ๋ฅผ ์ด๋ป๊ฒ ํด๊ฒฐํ ์ง ๊ณ ๋ฏผํ๊ณ ์ ๊ทผํ๋ ๊ณผ์ ์ ๋ฐ๋ณตํ๋ฉด์ ๋๋ง์ ๋ฌธ์ ํด๊ฒฐ ํ๋ก์ธ์ค๋ฅผ ์ ๋ฆฝํ๋๋ฐ ๋ง์ด ๋์์ด ๋์๋ค. ๊ทธ๋ฆฌ๊ณ ์ด๋ฐ ๊ฒฝํ๋ค์ด ์์ด๋ฉด์ ์์ผ๋ก ๋ ์ด๋ ค์ด ๋ฌธ์ ๋ฅผ ๋ง๋๊ฒ ๋์์ ๋ ๋๋ ค์ํ์ง ์๊ณ ์ฆ๊ธฐ๋ฉด์ ํด๊ฒฐํ ์ ์๋ ํ์ด ๋ ๊ฒ์ด๋ค.
๋ง์ง๋ง์ผ๋ก, ์ฑ ์ ํตํ ํ์ต๋ง์ผ๋ก๋ ํ๊ณ๊ฐ ์๋ค๋ ๊ฒ๋ ๊นจ๋ฌ์๋ค. ์ค์ ๋ก ์ ์ฉํด๋ณด๊ณ ์ค๋ฅ๋ฅผ ๊ฒฝํํ๋ฉฐ, ์์์น ๋ชปํ ์ํฉ์ ์ง๋ฉดํด๋ณด๋ ๊ฒ์ด ์ ๋๋ก๋ ํ์ต์ธ ๊ฒ ๊ฐ๋ค๋ ์๊ฐ์ ๋ง์ด ํ๋ค.
์ค์ ๋ก ํ ์คํธ ํด๋ณด์ง ์์๋ค๋ฉด ๋๋ ์์ผ๋ก ๊ณ์ ์๋ชป๋ ์ง์์ ๊ฐ์ง๊ณ ์์๊ฒ ์ง..?
Ref
Uploaded by N2T