You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@helix.apache.org by dasahcc <gi...@git.apache.org> on 2017/04/27 20:40:27 UTC

[GitHub] helix pull request #87: Make map in NotificationContext synchronized

GitHub user dasahcc opened a pull request:

    https://github.com/apache/helix/pull/87

    Make map in NotificationContext synchronized

    One issue we observed is that when batch messages enabled, it will have NPE in ZNRecord merge record. Race condition could be the root cause. The only place can have race condition is the current state update map in NotificationContext, which is passed as input for multiple sub tasks in BatchMessageHandler.

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

    $ git pull https://github.com/dasahcc/helix helix-0.6.x

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

    https://github.com/apache/helix/pull/87.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 #87
    
----

----


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

[GitHub] helix pull request #87: Make map in NotificationContext synchronized

Posted by dasahcc <gi...@git.apache.org>.
Github user dasahcc commented on a diff in the pull request:

    https://github.com/apache/helix/pull/87#discussion_r116132045
  
    --- Diff: helix-core/src/main/java/org/apache/helix/messaging/handling/HelixTaskExecutor.java ---
    @@ -143,6 +145,7 @@ public HelixTaskExecutor(ParticipantStatusMonitor participantStatusMonitor) {
         _hdlrFtyRegistry = new ConcurrentHashMap<String, MsgHandlerFactoryRegistryItem>();
         _executorMap = new ConcurrentHashMap<String, ExecutorService>();
         _batchMessageExecutorService = Executors.newCachedThreadPool();
    --- End diff --
    
    Sure! I will added in PR 91 since that is more related to threadpool size.


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

[GitHub] helix pull request #87: Make map in NotificationContext synchronized

Posted by dasahcc <gi...@git.apache.org>.
Github user dasahcc closed the pull request at:

    https://github.com/apache/helix/pull/87


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

[GitHub] helix pull request #87: Make map in NotificationContext synchronized

Posted by kishoreg <gi...@git.apache.org>.
Github user kishoreg commented on a diff in the pull request:

    https://github.com/apache/helix/pull/87#discussion_r116129454
  
    --- Diff: helix-core/src/main/java/org/apache/helix/messaging/handling/HelixTaskExecutor.java ---
    @@ -143,6 +145,7 @@ public HelixTaskExecutor(ParticipantStatusMonitor participantStatusMonitor) {
         _hdlrFtyRegistry = new ConcurrentHashMap<String, MsgHandlerFactoryRegistryItem>();
         _executorMap = new ConcurrentHashMap<String, ExecutorService>();
         _batchMessageExecutorService = Executors.newCachedThreadPool();
    --- End diff --
    
    Lets have a default value here of 40 (same as the non batch executor size)  for the thread pool size instead of setting it to cachedThreadPool.


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