[
https://issues.apache.org/jira/browse/MESOS-7467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16002745#comment-16002745
]
Jie Yu commented on MESOS-7467:
-------------------------------
I'd prefer we return Owned<T>. The reason is because that'll force the module
writer to transfer the ownership of the object to the caller. That means the
module can no longer hold a reference to the object, which is a good thing
because sharing will potentially cause race conditions which will be hard to
triage.
> Update Module interface to accept master/agent flags and return a managed
> pointer.
> ----------------------------------------------------------------------------------
>
> Key: MESOS-7467
> URL: https://issues.apache.org/jira/browse/MESOS-7467
> Project: Mesos
> Issue Type: Task
> Components: modules
> Reporter: Kapil Arya
> Assignee: Kapil Arya
> Labels: mesosphere
>
> Currently, the module create signature looks like
> {code}
> T* create(const Parameters&);
> {code}
> The proposal is to change the signature to look like:
> {code}
> struct ModuleInfo {
> Option<Parameters> parameters;
> Option<master::Flags> masterFlags;
> Option<slave::Flags> slaveFlags;
> };
> shared_ptr<T> create(const ModuleInfo&);
> {code}
> As a side effect, it would require us to expose master/agent flags in public
> headers.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)