File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ DBMS:
125125 parent : index
126126 url : /wiki/DBMS
127127 updated : ' 2018-12-06 18:54:36 +0900'
128- children : [Hbase, MS-SQL]
128+ children : [Hbase, MS-SQL, Transaction ]
129129DevOps :
130130 type : wiki
131131 title : DevOps
@@ -212,7 +212,7 @@ index:
212212 summary : ' anyjava wiki index'
213213 parent : null
214214 url : /wiki/index
215- updated : ' 2020-09-07 10:46:08 +0900'
215+ updated : ' 2020-10-06 02:03:47 +0900'
216216 children : []
217217Infra :
218218 type : wiki
356356 summary : ' Microservice Architecture'
357357 parent : index
358358 url : /wiki/MSA
359- updated : ' 2019-10-29 18:40:41 +0900'
359+ updated : ' 2020-09-15 03:04:13 +0900'
360360 children : []
361361NoSQL :
362362 type : wiki
@@ -494,6 +494,14 @@ Test_Framework:
494494 url : /wiki/Test_Framework
495495 updated : ' 2018-11-28 08:25:51 +0900'
496496 children : [spock]
497+ Transaction :
498+ type : wiki
499+ title : ํธ๋์ญ์
500+ summary : ํธ๋์ญ์
501+ parent : DBMS
502+ url : /wiki/Transaction
503+ updated : ' 2020-10-06 02:07:35 +0900'
504+ children : []
497505Web :
498506 type : wiki
499507 title : Web
Original file line number Diff line number Diff line change 8181- thread
8282- tip
8383- tools
84+ - transaction
8485- validation
8586- webflux
8687- xss
Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ logstash:
121121 - {fileName: logstash}
122122' db, ' :
123123 - {fileName: MS-SQL}
124+ - {fileName: Transaction}
124125' ms-sql, ' :
125126 - {fileName: MS-SQL}
126127dbms :
@@ -182,6 +183,8 @@ synology:
182183 - {fileName: Test_Framework}
183184junit :
184185 - {fileName: Test_Framework}
186+ transaction :
187+ - {fileName: Transaction}
185188webflux :
186189 - {fileName: WebFlux}
187190' secure, ' :
Original file line number Diff line number Diff line change 1+ ---
2+ layout : wiki
3+ title : ํธ๋์ญ์
4+ summary : ํธ๋์ญ์
5+ date : 2020-10-06 02:04:00 +0900
6+ updated : 2020-10-06 02:22:36 +0900
7+ tags : db, transaction
8+ toc : true
9+ public : true
10+ parent : DBMS
11+ latex : false
12+ adsense : true
13+ ---
14+ * TOC
15+ {: toc }
16+
17+ ## ์ฃผ์๊ฐ๋
18+
19+
20+ > ์๋ ๋ด์ฉ๋ค์ '๋ฐ์ดํฐ ์ค์ฌ ์ ํ๋ฆฌ์ผ์ด์
์ค๊ณ 07์ฅ ํธ๋์ญ์
'์ ์ฐธ๊ณ ํ์์ต๋๋ค.
21+
22+
23+ * [ Dirty Reads] ( https://en.wikipedia.org/wiki/Isolation_(database_systems)#Dirty_reads )
24+ * ํ ํด๋ผ์ด์ธํธ๊ฐ ๋ค๋ฅธ ํด๋ผ์ด์ธํธ๊ฐ ์ผ์ง๋ง ์์ง ์ปค๋ฐ๋์ง ์์ ๋ฐ์ดํฐ๋ฅผ ์ฝ๋๋ค. ์ปค๋ฐ ํ ์ฝ๊ธฐ ๋๋ ๊ทธ๋ณด๋ค ๊ฐํ ๊ฒฉ๋ฆฌ ์์ค์ ๋ํฐ ์ฝ๊ธฐ๋ฅผ ๋ฐฉ์งํ๋ค.
25+
26+ * [ Dirty Write] ( https://en.wikipedia.org/wiki/Write%E2%80%93read_conflict )
27+ * ํ ํด๋ผ์ด์ธํธ๊ฐ ๋ค๋ฅธ ํด๋ผ์ด์ธํธ๊ฐ ์ป์ง๋ง ์์ง ์ปค๋ฐ๋์ง ์์ ๋ฐ์ดํฐ๋ฅผ ๋ฎ์ด์ด๋ค. ๊ฑฐ์ ๋ชจ๋ ํธ๋์ญ์
๊ตฌํ์ ๋ํฐ ์ฐ๊ธฐ๋ฅผ ๋ฐฉ์งํ๋ค.
28+
29+ * ์ฝ๊ธฐ ์คํ (๋น๋ฐ๋ณต ์ฝ๊ธฐ)
30+ * ํด๋ผ์ด์ธํธ๋ ๋ค๋ฅธ ์์ ์ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ๋ค๋ฅธ ๋ถ๋ถ์ ๋ณธ๋ค. ์ด ๋ฌธ์ ๋ฅผ ๋ง๊ธฐ ์ํ ํด๊ฒฐ์ฑ
์ผ๋ก ํธ๋์ญ์
์ด ์ด๋ ์์ ์ ์ผ๊ด๋ ์ค๋
์์ผ๋ก๋ถํฐ ์ฝ๋ ์ค๋
์ ๊ฒฉ๋ฆฌ๋ฅผ ๊ฐ์ฅ ํํ ์ฌ์ฉํ๋ค. (REPEATABLE READ) ์ค๋
์ ๊ฒฉ๋ฆฌ๋ ๋ณดํต ๋ค์ค ๋ฒ์ ๋์์ฑ ์ ์ด(MVCC) ๋ฅผ ์จ์ ๊ตฌํ ํ๋ค.
31+
32+ * ๊ฐฑ์ ์์ค
33+ * ๋ ํด๋ผ์ด์ธํธ๊ฐ ๋์์ read-modify-write ์ฃผ๊ธฐ๋ฅผ ์คํํ๋ค. ์๋ก ๋ค๋ฅธ ํธ๋์ญ์
์ด ์์ ๋ด์ฉ์ ํํํ๋ ๋ฒ์ ผ์ด ๋ฎ์ผ์ฐ๋ ๊ฒฝ์ฐ. ์ค๋
์ ๊ฒฉ๋ฆฌ ๊ตฌํ ์ค ์ด๋ค ๊ฒ์ ์ด๋ฐ ์ด์ ํ์์ ์๋์ผ๋ก ๋ง์์ฃผ์ง๋ง ๊ทธ๋ ์ง ์์ ๊ฒ์ ์๋ ์ ๊ธ(SELECT FOR UPDATE)์ด ํ์ํ๋ค.
34+
35+ * ์ฐ๊ธฐ ์คํ
36+ * ํธ๋์ญ์
์ด ๋ฌด์์ธ๊ฐ๋ฅผ ์ฝ๊ณ ์ฝ์ ๊ฐ์ ๊ธฐ๋ฐ์ผ๋ก ์ด๋ค ๊ฒฐ์ ์ ํ๊ณ ๊ทธ ๊ฒฐ์ ์ ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ์ด๋ค. ๊ทธ๋ฌ๋ ์ฐ๊ธฐ๋ฅผ ์คํํ๋ ์์ ์๋ ๊ฒฐ์ ์ ์ ๊ฐ ๋ ์ด์ ์ฐธ์ด ์๋๋ค. ์ง๋ ฌ์ฑ ๊ฒฉ๋ฆฌ๋ง ์ด๋ฐ ์ด์ ํ์์ ๋ง์ ์ ์๋ค.
37+ * ๋ณดํต INSERT ํ ๋ ๋ฐ์ํ๋๋ฐ, Table ์ UNIQUE INDEX ์ ํด๊ฒฐํ๊ฑฐ๋ id ๊ธฐ๋ฐ์ ์ง๋ ฌ์ฑ ๊ฒฉ๋ฆฌ, ํน์ ๋ฒ์๊ธฐ๋ฐ์ ์์ ์ ๊ธ(predicate lock)์ด ํ์ํจ.
38+
39+
40+ * [ ํฌํ
์ฝ๊ธฐ(Phantom Reads)] ( https://en.wikipedia.org/wiki/Isolation_(database_systems)#Phantom_reads )
41+ * ํธ๋์ญ์
์ด ์ด๋ค ๊ฒ์ ์กฐ๊ฑด์ ๋ถํฉํ๋ ๊ฐ์ฒด๋ฅผ ์ฝ๋๋ค. ๋ค๋ฅธ ํด๋ผ์ด์ธํธ๊ฐ ๊ทธ ๊ฒ์ ๊ฒฐ๊ณผ์ ์ํฅ์ ์ฃผ๋ ใด์ฐ๊ธฐ๋ฅผ ์คํํ๋ค. ์ค๋
์ผ ใ
๊ฒฉ๋ฆฌ๋ ๊ฐ๋จํ ํฌํ
์ฝ๊ธฐ๋ ๋ง์์ฃผ์ง๋ง ์ฐ๊ธฐ ์คํ ๋งฅ๋ฝ์์ ๋ฐ์ํ๋ ํฌํ
์ ์์ธ ๋ฒ์ ์ ๊ธ์ฒ๋ผ ํน๋ณํ ์ฒ๋ฆฌ๊ฐ ํ์ํ๋ค.
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ layout : wiki
33title : index
44summary : anyjava wiki index
55date : 2018-08-15 19:41:36 +0900
6- updated : 2020-09-07 10:46:08 +0900
6+ updated : 2020-10-06 02:03:47 +0900
77tags :
88toc : true
99public : true
@@ -43,6 +43,7 @@ latex : false
4343 * [[ spock]]
4444 * [[ JUnit5]]
4545* [[ DBMS]]
46+ * [[ Transaction]]
4647 * [[MS-SQL]]
4748 * [[ NoSQL]]
4849 * [[ Hbase]]
You canโt perform that action at this time.
0 commit comments