Repository: reef
Updated Branches:
  refs/heads/master 45cae485e -> a28f994ea


[REEF-1504] Collect garbage in the idle time of UpdateTaskHost.TaskBody

This change moved garbage collection to before _dataReceiver.Reduce,
which corresponds to update task idle time.

JIRA:
  [REEF-1504](https://issues.apache.org/jira/browse/REEF-1504)

Pull request:
  This closes #1141


Project: http://git-wip-us.apache.org/repos/asf/reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/a28f994e
Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/a28f994e
Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/a28f994e

Branch: refs/heads/master
Commit: a28f994ea0f253450889cb0ad25ee253f80a4579
Parents: 45cae48
Author: Mariia Mykhailova <[email protected]>
Authored: Thu Sep 29 16:18:03 2016 -0700
Committer: Julia Wang <[email protected]>
Committed: Mon Oct 3 10:26:27 2016 -0700

----------------------------------------------------------------------
 lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/reef/blob/a28f994e/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs 
b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs
index 6c23b65..5fb1110 100644
--- a/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs
+++ b/lang/cs/Org.Apache.REEF.IMRU/OnREEF/IMRUTasks/UpdateTaskHost.cs
@@ -98,8 +98,6 @@ namespace Org.Apache.REEF.IMRU.OnREEF.IMRUTasks
                     _dataAndControlMessageSender.Send(message);
                 }
 
-                var input = _dataReceiver.Reduce(_cancellationSource);
-
                 if (_invokeGc)
                 {
                     Logger.Log(Level.Verbose, "Calling Garbage Collector");
@@ -107,6 +105,8 @@ namespace Org.Apache.REEF.IMRU.OnREEF.IMRUTasks
                     GC.WaitForPendingFinalizers();
                 }
 
+                var input = _dataReceiver.Reduce(_cancellationSource);
+
                 try
                 {
                     updateResult = _updateTask.Update(input);

Reply via email to