hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wangzw <...@git.apache.org>
Subject [GitHub] incubator-hawq pull request: HAWQ-255: change CHECKPOINT_START_LOC...
Date Thu, 17 Dec 2015 07:52:58 GMT
Github user wangzw commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/191#discussion_r47877784
  
    --- Diff: src/backend/storage/smgr/smgr.c ---
    @@ -1327,28 +1327,6 @@ smgrDoDeleteActions(
     						palloc0((*listCount) * sizeof(PersistentFileSysObjStateChangeResult));
     
     	/*
    -	 * There are two situations where we get here. CommitTransaction()/AbortTransaction()
or via
    -	 * AbortSubTransaction(). In the first case, we have already obtained the MirroredLock
and
    -	 * CheckPointStartLock. In the second case, we have not obtained the locks, so we attempt
    -	 * to get them to make sure proper lock order is maintained.
    -	 *
    -	 * Normally, if a relation lock is needed, it is obtained before the MirroredLock and
CheckPointStartLock,
    -	 * but we have not yet obtained an EXCLUSIVE LockRelationForResynchronize. This lock
will be obtained in
    -	 * PersistentFileSysObj_EndXactDrop(). This is an exception to the normal lock ordering,
which is done
    -	 * to reduce the time that the lock is held, thus allowing a larger window of time for
filerep
    -	 * resynchronization to obtain the lock.
    -	 */
    -
    -	/*
    -	 * The logic will eventually obtain a CheckpointStartLock in PersistentRelation_Dropped(),
    -	 * but functions called from this function my obtain Exclusive locks before the
    -	 * CheckpointStartLock is obtained. This could cause a potential deadlock in the future.
    -	 * We need to take a CheckpointStartLock here to maintain proper lock ordering
    -	 * (i.e. MirrorLock -> CheckpointStartLock ).
    -	 */
    -	CHECKPOINT_START_LOCK;
    -
    --- End diff --
    
    Although we do not have a mirror any more, but we still have MirrorLock (should be removed).
If we remove this lock, can we still keep the lock ordering and prevent from dead locking?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message