Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
961084ef
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
961084ef
编写于
2月 27, 2017
作者:
A
Ashwin Agrawal and Xin Zhang
提交者:
Ashwin Agrawal
3月 06, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add test to validate checkpoint blocked by commit and commit prepared.
上级
a5a473c0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
110 addition
and
10 deletion
+110
-10
src/backend/utils/misc/faultinjector.c
src/backend/utils/misc/faultinjector.c
+0
-9
src/test/isolation2/expected/commit_transaction_block_checkpoint.out
...olation2/expected/commit_transaction_block_checkpoint.out
+69
-0
src/test/isolation2/isolation2_schedule
src/test/isolation2/isolation2_schedule
+2
-1
src/test/isolation2/sql/commit_transaction_block_checkpoint.sql
...st/isolation2/sql/commit_transaction_block_checkpoint.sql
+39
-0
未找到文件。
src/backend/utils/misc/faultinjector.c
浏览文件 @
961084ef
...
...
@@ -1074,15 +1074,6 @@ FaultInjector_NewHashEntry(
case
FileRepTransitionToChangeTracking
:
case
FileRepIsOperationCompleted
:
case
FileRepImmediateShutdownRequested
:
case
TransactionCommitPass1FromCreatePendingToCreated
:
case
TransactionCommitPass1FromDropInMemoryToDropPending
:
case
TransactionCommitPass1FromAbortingCreateNeededToAbortingCreate
:
case
TransactionAbortPass1FromCreatePendingToAbortingCreate
:
case
TransactionAbortPass1FromAbortingCreateNeededToAbortingCreate
:
case
TransactionCommitPass2FromDropInMemoryToDropPending
:
case
TransactionCommitPass2FromAbortingCreateNeededToAbortingCreate
:
case
TransactionAbortPass2FromCreatePendingToAbortingCreate
:
case
TransactionAbortPass2FromAbortingCreateNeededToAbortingCreate
:
case
FinishPreparedTransactionCommitPass1FromCreatePendingToCreated
:
case
FinishPreparedTransactionCommitPass2FromCreatePendingToCreated
:
...
...
src/test/isolation2/expected/commit_transaction_block_checkpoint.out
0 → 100644
浏览文件 @
961084ef
-- TEST 1: block checkpoint on segments
-- pause the 2PC after setting inCommit flag
! gpfaultinjector -f twophase_transaction_commit_prepared -m async -y suspend -o 0 -H ALL -r primary;
20170303:00:02:12:067930 gpfaultinjector:-[INFO]:-Starting gpfaultinjector with args: -f twophase_transaction_commit_prepared -m async -y suspend -o 0 -H ALL -r primary
20170303:00:02:12:067930 gpfaultinjector:-[INFO]:-Injecting fault on content=0:dbid=2:mode=s:status=u
20170303:00:02:12:067930 gpfaultinjector:-[INFO]:-Injecting fault on content=1:dbid=3:mode=s:status=u
20170303:00:02:12:067930 gpfaultinjector:-[INFO]:-Injecting fault on content=2:dbid=4:mode=s:status=u
20170303:00:02:12:067930 gpfaultinjector:-[INFO]:-DONE
-- trigger a 2PC, and it will block at commit;
2: checkpoint;
CHECKPOINT
2: begin;
BEGIN
2: create table t_commit_transaction_block_checkpoint (c int) distributed by (c);
CREATE
2&: commit; <waiting ...>
-- do checkpoint on dbid 3 (segment 1) in utility mode, and it should block
3U&: checkpoint; <waiting ...>
-- resume the 2PC after setting inCommit flag
! gpfaultinjector -f twophase_transaction_commit_prepared -m async -y reset -o 0 -H ALL -r primary;
20170303:00:02:14:067954 gpfaultinjector:-[INFO]:-Starting gpfaultinjector with args: -f twophase_transaction_commit_prepared -m async -y reset -o 0 -H ALL -r primary
20170303:00:02:14:067954 gpfaultinjector:-[INFO]:-Injecting fault on content=0:dbid=2:mode=s:status=u
20170303:00:02:14:067954 gpfaultinjector:-[INFO]:-Injecting fault on content=1:dbid=3:mode=s:status=u
20170303:00:02:14:067954 gpfaultinjector:-[INFO]:-Injecting fault on content=2:dbid=4:mode=s:status=u
20170303:00:02:14:067954 gpfaultinjector:-[INFO]:-DONE
2<: <... completed>
COMMIT
3U<: <... completed>
CHECKPOINT
-- TEST 2: block checkpoint on master
-- pause the CommitTransaction right before persistent table cleanup after
-- notifyCommittedDtxTransaction()
! gpfaultinjector -f transaction_commit_pass1_from_drop_in_memory_to_drop_pending -m async -y suspend -o 0 -s 1;
20170303:00:02:15:067973 gpfaultinjector:-[INFO]:-Starting gpfaultinjector with args: -f transaction_commit_pass1_from_drop_in_memory_to_drop_pending -m async -y suspend -o 0 -s 1
20170303:00:02:15:067973 gpfaultinjector:-[INFO]:-Injecting fault on content=-1:dbid=1:mode=s:status=u
20170303:00:02:15:067973 gpfaultinjector:-[INFO]:-DONE
-- trigger a 2PC, and it will block at commit;
2: checkpoint;
CHECKPOINT
2: begin;
BEGIN
2: drop table t_commit_transaction_block_checkpoint;
DROP
2&: commit; <waiting ...>
-- do checkpoint on dbid 1 (master) in utility mode, and it should block
1U&: checkpoint; <waiting ...>
-- resume the 2PC
! gpfaultinjector -f transaction_commit_pass1_from_drop_in_memory_to_drop_pending -m async -y reset -o 0 -s 1;
20170303:00:02:16:067988 gpfaultinjector:-[INFO]:-Starting gpfaultinjector with args: -f transaction_commit_pass1_from_drop_in_memory_to_drop_pending -m async -y reset -o 0 -s 1
20170303:00:02:16:067988 gpfaultinjector:-[INFO]:-Injecting fault on content=-1:dbid=1:mode=s:status=u
20170303:00:02:16:067988 gpfaultinjector:-[INFO]:-DONE
2<: <... completed>
COMMIT
1U<: <... completed>
CHECKPOINT
src/test/isolation2/isolation2_schedule
浏览文件 @
961084ef
test:
setup
test:
commit_transaction_block_checkpoint
test: setup
# Tests on Append-Optimized tables (row-oriented).
test: uao/alter_while_vacuum_row
test: uao/alter_while_vacuum2_row
...
...
src/test/isolation2/sql/commit_transaction_block_checkpoint.sql
0 → 100644
浏览文件 @
961084ef
-- TEST 1: block checkpoint on segments
-- pause the 2PC after setting inCommit flag
!
gpfaultinjector
-
f
twophase_transaction_commit_prepared
-
m
async
-
y
suspend
-
o
0
-
H
ALL
-
r
primary
;
-- trigger a 2PC, and it will block at commit;
2
:
checkpoint
;
2
:
begin
;
2
:
create
table
t_commit_transaction_block_checkpoint
(
c
int
)
distributed
by
(
c
);
2
&
:
commit
;
-- do checkpoint on dbid 3 (segment 1) in utility mode, and it should block
3
U
&
:
checkpoint
;
-- resume the 2PC after setting inCommit flag
!
gpfaultinjector
-
f
twophase_transaction_commit_prepared
-
m
async
-
y
reset
-
o
0
-
H
ALL
-
r
primary
;
2
<
:
3
U
<
:
-- TEST 2: block checkpoint on master
-- pause the CommitTransaction right before persistent table cleanup after
-- notifyCommittedDtxTransaction()
!
gpfaultinjector
-
f
transaction_commit_pass1_from_drop_in_memory_to_drop_pending
-
m
async
-
y
suspend
-
o
0
-
s
1
;
-- trigger a 2PC, and it will block at commit;
2
:
checkpoint
;
2
:
begin
;
2
:
drop
table
t_commit_transaction_block_checkpoint
;
2
&
:
commit
;
-- do checkpoint on dbid 1 (master) in utility mode, and it should block
1
U
&
:
checkpoint
;
-- resume the 2PC
!
gpfaultinjector
-
f
transaction_commit_pass1_from_drop_in_memory_to_drop_pending
-
m
async
-
y
reset
-
o
0
-
s
1
;
2
<
:
1
U
<
:
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录