Repository: samza
Updated Branches:
  refs/heads/master a702b3bb4 -> f6c99a4c4


SAMZA-1762: Fix Memory link in the Timer Registry Map

Found a memory leak in the SystemTimerScheduler which does not remove the 
timers from scheduledFutures after the timers are fired. This caused memory 
problem for Samza jobs using TimerFn feature. This patch fixes this issue.

Author: xinyuiscool <[email protected]>

Reviewers: Boris S <[email protected]>

Closes #566 from xinyuiscool/SAMZA-1762


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

Branch: refs/heads/master
Commit: f6c99a4c4f71ef7d98528fac84a7669c5a2b6891
Parents: a702b3b
Author: xinyuiscool <[email protected]>
Authored: Tue Jun 26 14:35:00 2018 -0700
Committer: xiliu <[email protected]>
Committed: Tue Jun 26 14:35:00 2018 -0700

----------------------------------------------------------------------
 RELEASE.md                                      | 20 ++++++++++++++++++++
 .../apache/samza/task/SystemTimerScheduler.java |  1 +
 2 files changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/samza/blob/f6c99a4c/RELEASE.md
----------------------------------------------------------------------
diff --git a/RELEASE.md b/RELEASE.md
index cb83594..31b1e29 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -57,6 +57,10 @@ Then sign it:
 
     gpg --sign --armor --detach-sig 
build/distribution/source/apache-samza-*.tgz
 
+Create SHA1 signature:
+
+    gpg --print-md SHA1 ./build/distribution/source/apache-samza-*.tgz > 
./build/distribution/source/apache-samza-*.tgz.sha1
+
 Make a signed git tag for the release candidate:
 
     git tag -s release-$VERSION-rc0 -m "Apache Samza $VERSION release 
candidate 0"
@@ -65,6 +69,22 @@ Push the release tag to remote repository:
 
     git push origin release-$VERSION-rc0
 
+Build the tarball for samza-tool:
+
+    ./gradlew releaseToolsTarGz
+
+Then sign it:
+
+    gpg --sign --armor --detach-sig 
./samza-tools/build/distributions/samza-tools-*.tgz
+
+Create MD5 signature:
+
+    gpg --print-md MD5 ./samza-tools/build/distributions/samza-tools-*.tgz > 
./samza-tools/build/distributions/samza-tools-*.tgz.md5
+
+Create SHA1 signature:
+
+    gpg --print-md SHA1 ./build/distribution/source/apache-samza-*.tgz > 
./build/distribution/source/apache-samza-*.tgz.sha1
+
 Edit `$HOME/.gradle/gradle.properties` and add your GPG key information:
 
     signing.keyId=01234567                          # Your GPG key ID, as 8 
hex digits

http://git-wip-us.apache.org/repos/asf/samza/blob/f6c99a4c/samza-core/src/main/java/org/apache/samza/task/SystemTimerScheduler.java
----------------------------------------------------------------------
diff --git 
a/samza-core/src/main/java/org/apache/samza/task/SystemTimerScheduler.java 
b/samza-core/src/main/java/org/apache/samza/task/SystemTimerScheduler.java
index 4589058..aa9792b 100644
--- a/samza-core/src/main/java/org/apache/samza/task/SystemTimerScheduler.java
+++ b/samza-core/src/main/java/org/apache/samza/task/SystemTimerScheduler.java
@@ -63,6 +63,7 @@ public class SystemTimerScheduler {
 
     final long delay = timestamp - System.currentTimeMillis();
     final ScheduledFuture<?> scheduledFuture = executor.schedule(() -> {
+        scheduledFutures.remove(key);
         readyTimers.put(TimerKey.of(key, timestamp), callback);
 
         if (timerListener != null) {

Reply via email to