You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by ji...@apache.org on 2016/04/21 17:01:08 UTC

[4/5] incubator-quickstep git commit: Deleted Blobs After Use in Parallel Loading. (#179)

Deleted Blobs After Use in Parallel Loading. (#179)

Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/94e1b8d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/94e1b8d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/94e1b8d3

Branch: refs/heads/master
Commit: 94e1b8d35d923048180be9c953f0fc5aba148863
Parents: 390310f
Author: Zuyu ZHANG <zu...@users.noreply.github.com>
Authored: Thu Apr 21 09:27:31 2016 -0500
Committer: Jignesh Patel <pa...@users.noreply.github.com>
Committed: Thu Apr 21 09:27:31 2016 -0500

----------------------------------------------------------------------
 relational_operators/TextScanOperator.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/94e1b8d3/relational_operators/TextScanOperator.cpp
----------------------------------------------------------------------
diff --git a/relational_operators/TextScanOperator.cpp b/relational_operators/TextScanOperator.cpp
index 80cf953..e6d5200 100644
--- a/relational_operators/TextScanOperator.cpp
+++ b/relational_operators/TextScanOperator.cpp
@@ -288,7 +288,7 @@ void TextScanWorkOrder::execute() {
 
     std::fclose(file);
   } else {
-    BlobReference blob = storage_manager_->getBlob(text_blob_);
+    MutableBlobReference blob = storage_manager_->getBlobMutable(text_blob_);
     const char *blob_pos = static_cast<const char*>(blob->getMemory());
     const char *blob_end = blob_pos + text_size_;
     bool have_row = false;
@@ -300,6 +300,10 @@ void TextScanWorkOrder::execute() {
         output_destination_->insertTupleInBatch(tuple);
       }
     } while (have_row);
+
+    // Drop the consumed blob produced by TextSplitWorkOrder.
+    blob.release();
+    storage_manager_->deleteBlockOrBlobFile(text_blob_);
   }
 }