You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Palak Choudhary (JIRA)" <ji...@apache.org> on 2015/02/12 06:24:11 UTC

[jira] [Commented] (MESOS-1457) Process IDs should be required to be human-readable

    [ https://issues.apache.org/jira/browse/MESOS-1457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14317626#comment-14317626 ] 

Palak Choudhary commented on MESOS-1457:
----------------------------------------

ProcessBase class is virtually inherited by Process class which in turns gets inherited all over the place, however Its ProcessBase which is initialized in the constructor of these classes and Process class is invoked using default constructor which invokes ProcessBase's constructor that accepts "" so this causes no problems

If I make the ProcessBase costructor string mandatory, then constructor of Process is not able to find ProcessBase() accepting constructor. So,
Process(const std::string& id) : ProcessBase(id) {}
would have to be added which means all the sub classes constructors needs to be modified.

Eg:
  RateLimiterProcess(int permits, const Duration& duration)
    : ProcessBase(ID::generate("__limiter__"))
  {//code}

Needs to change to
  std:: string id =  ID::generate("__limiter__");
  RateLimiterProcess(int permits, const Duration& duration)
    : Process(id), ProcessBase(id)
  {//code}

In the entire source code base, only 3 tests benchmarks.cpp, process_tests.cpp and cram_md5_authentication_tests.cpp use ProcessBase without passing any string. Rest all the callers pass a specific string. 

A cleaner solution can be to change these caller to explicitly pass ProcessBase a string to identify themselves, that way at least all existing callers will be human readable (which are total like 6-7 places )
Personally I think this seems to be a better solution.

I can comment the ProcessBase constructor saying "Please provide process name for ease of debugging" or something like that.

Any suggestions on how to proceed ?

> Process IDs should be required to be human-readable 
> ----------------------------------------------------
>
>                 Key: MESOS-1457
>                 URL: https://issues.apache.org/jira/browse/MESOS-1457
>             Project: Mesos
>          Issue Type: Improvement
>          Components: libprocess
>            Reporter: Dominic Hamon
>            Assignee: Palak Choudhary
>            Priority: Minor
>
> When debugging, it's very useful to understand which processes are getting timeslices. As such, the human-readable names that can be passed to {{ProcessBase}} are incredibly valuable, however they are currently optional.
> If the constructor of {{ProcessBase}} took a mandatory string, every process would get a human-readable name and debugging would be much easier.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)