You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by zt...@apache.org on 2019/11/14 06:12:45 UTC
[hawq] branch taoz updated (2a050a1 -> 9012518)
This is an automated email from the ASF dual-hosted git repository.
ztao1987 pushed a change to branch taoz
in repository https://gitbox.apache.org/repos/asf/hawq.git.
from 2a050a1 Fix bug that deadlock cannot be resolved
new e16eaf4 fix deadlock error info
new 9012518 fix proc wait queue disorder in deadlock scenario
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/backend/commands/tablecmds.c | 30 +-----------------------------
src/backend/storage/lmgr/proc.c | 4 +++-
2 files changed, 4 insertions(+), 30 deletions(-)
[hawq] 01/02: fix deadlock error info
Posted by zt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ztao1987 pushed a commit to branch taoz
in repository https://gitbox.apache.org/repos/asf/hawq.git
commit e16eaf418e68683107514b03f97db74dafa99067
Author: ztao1987 <zh...@gmail.com>
AuthorDate: Wed Aug 14 15:13:47 2019 +0800
fix deadlock error info
---
src/backend/commands/tablecmds.c | 30 +-----------------------------
1 file changed, 1 insertion(+), 29 deletions(-)
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index c920260..2ac9ee3 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -1709,35 +1709,7 @@ ExecuteTruncate(TruncateStmt *stmt)
Relation rel;
PartitionNode *pNode;
- PG_TRY();
- {
- rel = heap_openrv(rv, AccessExclusiveLock);
- }
-
- PG_CATCH();
- {
- /*
- * In the case of the table being dropped concurrently,
- * throw a friendlier error than:
- *
- * "could not open relation with relid 1234"
- */
- if (rv->schemaname)
- ereport(ERROR,
- (errcode(ERRCODE_UNDEFINED_TABLE),
- errmsg("relation \"%s.%s\" does not exist",
- rv->schemaname, rv->relname),
- errOmitLocation(true)));
- else
- ereport(ERROR,
- (errcode(ERRCODE_UNDEFINED_TABLE),
- errmsg("relation \"%s\" does not exist",
- rv->relname),
- errOmitLocation(true)));
- PG_RE_THROW();
- }
- PG_END_TRY();
-
+ rel = heap_openrv(rv, AccessExclusiveLock);
truncate_check_rel(rel);
if (partcheck == 2)
[hawq] 02/02: fix proc wait queue disorder in deadlock scenario
Posted by zt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ztao1987 pushed a commit to branch taoz
in repository https://gitbox.apache.org/repos/asf/hawq.git
commit 90125185e1825dc5b6da05e422493b72abc5b495
Author: ztao1987 <zh...@gmail.com>
AuthorDate: Fri Aug 16 21:55:34 2019 +0800
fix proc wait queue disorder in deadlock scenario
---
src/backend/storage/lmgr/proc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 5bb008f..0a6db6c 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -1174,12 +1174,14 @@ CheckDeadLock(void)
goto check_done;
}
+ Assert(MyProc->waitLock != NULL);
+ RemoveFromWaitQueue(MyProc, LockTagHashCode(&(MyProc->waitLock->tag)));
+
/*
* Unlock my semaphore so that the interrupted ProcSleep() call can
* finish.
*/
PGSemaphoreUnlock(&MyProc->sem);
- MyProc->waitStatus = STATUS_FOUND;
/*
* We're done here. Transaction abort caused by the error that ProcSleep