[GitHub] incubator-hawq pull request #1278: HAWQ-1498. Segments keep open file descri...

2017-08-13 Thread jiny2
Github user jiny2 closed the pull request at:

https://github.com/apache/incubator-hawq/pull/1278


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1278: HAWQ-1498. Segments keep open file descri...

2017-08-10 Thread linwen
Github user linwen commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1278#discussion_r132620396
  
--- Diff: src/backend/storage/file/fd.c ---
@@ -2403,8 +2479,22 @@ HdfsGetConnection(const char * path)
}
}
 
-   entry = (struct FsEntry *) hash_search(HdfsFsTable, location,
-   HASH_ENTER, &found);
+   /* If this is for normal connection, check from normal table, 
otherwise,
+* check the table for dropping. */
+   if (!isForDrop) {
+   entry = (struct FsEntry *) hash_search(HdfsFsTable,
+   
   location,
+   
   HASH_ENTER,
+   
   &found);
+   }
+   else
+   {
+   elog(LOG, "search 4 drop 1");
--- End diff --

Is it a necessary log or better to be changed more meaningful?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1278: HAWQ-1498. Segments keep open file descri...

2017-08-10 Thread linwen
Github user linwen commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1278#discussion_r132620508
  
--- Diff: src/backend/storage/file/fd.c ---
@@ -2432,7 +2525,12 @@ HdfsGetConnection(const char * path)
{
if (!login())
{
-   hash_search(HdfsFsTable, 
location, HASH_REMOVE, &found);
+   if (!isForDrop)
+   
hash_search(HdfsFsTable, location, HASH_REMOVE, &found);
+   else {
+   elog(LOG, "search 4 
drop 2");
--- End diff --

Same comment as last one, this log message is more like for debugging. 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1278: HAWQ-1498. Segments keep open file descri...

2017-08-10 Thread jiny2
GitHub user jiny2 opened a pull request:

https://github.com/apache/incubator-hawq/pull/1278

HAWQ-1498. Segments keep open file descriptors for deleted files

The idea is to hold a list of all connections ever used for dropping 
objects in HDFS, then when the transaction ends, no matter commit or rollback, 
those connections are forced to close. Those connections cached but never used 
for dropping, are not touched.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jiny2/incubator-hawq HAWQ-1498-2

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-hawq/pull/1278.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1278


commit ad5d4d9995d8e47c863b3c532cee40166d790cf8
Author: Yi 
Date:   2017-08-10T09:15:06Z

HAWQ-1498. Segments keep open file descriptors for deleted files




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---