On Wed, 12 May 2021 23:03:04 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

>> "prefix" is similar to "unique_id" as you said, but it is useful to group 
>> debugees.
>> 
>> For example, the host runs 2 container pods as following:
>> 
>> * Pod A
>>     * Container 1
>>     * Container 2
>>     * Container 3
>> * Pod B
>>     * Container 1
>>     * Container 2
>>     * Container 3
>> 
>> If we want to compare 2 pods with jhsdb, we can set ID like "A-1", "B-1".
>> However, if the prefix is supported on jhsdb, we can set ID and prefix like 
>> "1@localhost/A", "1@localhost/B". I think it is easy to understand.
>
> Ok, this explanation seems reasonable, but is not something that is really 
> conveyed with the the name `--prefix` or with the help "Sets the prefix to 
> distinguish SA debugee". We are at the same giving too much and too little 
> info. Too much in that we are saying that it is a prefix of some sort, which 
> then leads to that fact that we don't explain how it is used in the RMI URL.
> 
> I'm not saying that we need to explain how  the `--connect 
> [<id>@]<host>[:registryport][/prefix]` option is converted into an RMI URL 
> (although perhaps we should), but it seems we at least need to describe the 
> relation between `<id>` and `/prefix`. Otherwise no one is really going to 
> understand how/why to use it.
> 
> Also, having the prefix at the end of the "serverID" string seems odd. Maybe 
> it should be:
> 
>    [[prefix/]unique_id@]host[:port]

Finally, all parameters will be transformed to 
`//host[:port]/<serverNamePrefix>['_'<unique_id>]`.
`--prefix` and `id` affect to RMI object name to be precise. So ID is object 
name, then the prefix will be added to it.

Based on them, how about this?


--prefix <url prefix> Set the prefix to add to debug server instance name.


I understand is is odd the value is added to the tail even if it is named 
"prefix".
Both `prefix` and `id` are optional, so we can specify `prefix` only, then 
`prefix/@host` is strange for me.

How about this pattern? Use ":" instead of "/" like a URL.


[prefix:][unique_id@]host[:port]


I thought to give new name instead of "prefix", but I give up because I have 
not good idea and would be inconsistent system property. 
(`sun.jvm.hotspot.rmi.serverNamePrefix`)

-------------

PR: https://git.openjdk.java.net/jdk/pull/3669

Reply via email to