Github user gcaragea commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/146#discussion_r46597216
--- Diff: src/backend/cdb/cdbmetadatacache.c ---
@@ -619,6 +619,9 @@ BlockLocation *GetHdfsFileBlockLocations(const
HdfsFileInfo *file_info, uint64_t
if (cache_entry->block_num <= 1)
{
// only one file, re-fetch
+ LWLockRelease(MetadataCacheLock);
+
+ LWLockAcquire(MetadataCacheLock, LW_EXCLUSIVE);
--- End diff --
Can this create deadlock situations? Upgrading locks usually is a tricky
situation, can lead to a situation where:
- proc A has SHARED lock on foo and bar
- proc B has SHARED lock on foo and bar
- proc A requests EXCLUSIVE lock on foo and gets it
- proc B requests EXCLUSIVE lock on bar and gets it
- proc A requests EXCLUSIVE lock on bar and waits
- proc B requests EXCLUSIVE lock on foo and waits - deadlock
---
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 [email protected] or file a JIRA ticket
with INFRA.
---