Repository: helix Updated Branches: refs/heads/helix-0.6.x 594d94aca -> 5ee5e59ba
Make synchronized for AsyncCallback.startTimer to avoid race condition Project: http://git-wip-us.apache.org/repos/asf/helix/repo Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/cff462f8 Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/cff462f8 Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/cff462f8 Branch: refs/heads/helix-0.6.x Commit: cff462f8277464a2de9479adec5f8f0617bdc7cc Parents: 594d94a Author: Junkai Xue <j...@linkedin.com> Authored: Sat Jan 28 16:31:55 2017 -0800 Committer: Junkai Xue <j...@linkedin.com> Committed: Sat Jan 28 16:31:55 2017 -0800 ---------------------------------------------------------------------- .../src/main/java/org/apache/helix/messaging/AsyncCallback.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/helix/blob/cff462f8/helix-core/src/main/java/org/apache/helix/messaging/AsyncCallback.java ---------------------------------------------------------------------- diff --git a/helix-core/src/main/java/org/apache/helix/messaging/AsyncCallback.java b/helix-core/src/main/java/org/apache/helix/messaging/AsyncCallback.java index f9743a4..b5d4bb1 100644 --- a/helix-core/src/main/java/org/apache/helix/messaging/AsyncCallback.java +++ b/helix-core/src/main/java/org/apache/helix/messaging/AsyncCallback.java @@ -104,7 +104,7 @@ public abstract class AsyncCallback { _messagesSent = generatedMessage; } - final void startTimer() { + final synchronized void startTimer() { if (_timer == null && _timeout > 0) { if (_startTimeStamp == 0) { _startTimeStamp = new Date().getTime();