Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: ts_middleware
-
Labels:None
-
Story Points:1
-
Epic Link:
-
Sprint:TSSW Sprint - Apr 13 - Apr 27
-
Team:Telescope and Site
-
Urgent?:No
Description
We want to run Scripts with masterPriority=0 in order to make sure that they never become "master", which would trigger an expensive system-wide DDS realignment.
ADLink knows of no programmatic way to do this, but we can easily use env variable substitution in the ospl.xml configuration file and that variable can be optional. I suggest the following, where masterPriority="${OSPL_MASTER_PRIORITY:-1}" sets the master priority to the env variable OSPL_MASTER_PRIORITY, if defined, else 1. Yes the minus sign is needed (I checked that): the default delimiter really is ":-".
<DurabilityService name="durability">
|
<Network>
|
<Alignment>
|
<TimeAlignment>false</TimeAlignment>
|
<RequestCombinePeriod>
|
<Initial>2.5</Initial>
|
<Operational>0.1</Operational>
|
</RequestCombinePeriod>
|
</Alignment>
|
<WaitForAttachment maxWaitCount="100">
|
<ServiceName>ddsi2</ServiceName>
|
</WaitForAttachment>
|
</Network>
|
<NameSpaces>
|
<NameSpace name="defaultNamespace">
|
<Partition>*</Partition>
|
</NameSpace>
|
<Policy alignee="Initial"
|
aligner="true"
|
durability="Durable"
|
masterPriority="${OSPL_MASTER_PRIORITY:-1}"
|
nameSpace="defaultNamespace"/>
|
</NameSpaces>
|
</DurabilityService>
|
This will make it trivial for scripts to assign themselves a masterPriority of 0 and we can also easily assign an early CSC, such as a SAL/Kafka producer, a higher masterPriority.
Attachments
Issue Links
- is cloned by
-
CAP-527 Please use an env variable to specify the masterPriority level in the OSPL configuration
-
- Done
-
- is contained by
-
DM-22525 SAL features for 4.2
- Done
- mitigates
-
DM-23382 Set masterPriority in our OpenSplice configuration
- Won't Fix
- relates to
-
CAP-516 SAL 4.2 features
-
- Done
-
-
DM-23368 Use masterPriority=0 for scripts to speed up script launch
- Done
- mentioned in
-
Page Loading...
If you omit masterPriority (as we currently do) then you get the default value of 255!
So I don't think it is possible for my suggested change to break our code.
You can see that if you put the <Tracing> snippet listed above in your DurabilityService section. Here is an excerpt of what I see when I do that:
- Policies :
- Policy:
- NameSpace : defaultNamespace
- Aligner : TRUE
- Alignee : INITIAL
- DurabilityKind : ALL
- DelayedAlignment : FALSE
- EqualityCheck : FALSE
- MasterPriority : 255
- Rules : NULL
Also I tried it on low-level dds code (the same code I used to test memory leaks). I ran a reader with the following configuration:
<Policy alignee="Initial"
aligner="true"
durability="Durable"
masterPriority="${OSPL_MASTER_PRIORITY:-1}"
nameSpace="defaultNamespace"/>
and a writer with the same except the masterPriority line is deleted it all works fine.
I then repeated the test, but reversing configuration for reader and writer. Again it all worked.
So I suspect something else was wrong.
I did observe that if I get the
masterPriority="${OSPL_MASTER_PRIORITY:-1}"
entry wrong (for example if I forget the "-" in ":-1") then I can't do anything with OpenSplice. It's not subtle!